[feat] sse client support method and body configure#988
Merged
jeevatkm merged 3 commits intogo-resty:v3from Mar 22, 2025
Merged
[feat] sse client support method and body configure#988jeevatkm merged 3 commits intogo-resty:v3from
jeevatkm merged 3 commits intogo-resty:v3from
Conversation
jeevatkm
requested changes
Mar 21, 2025
Member
jeevatkm
left a comment
There was a problem hiding this comment.
@vegetablechicken233 Thanks for creating a new PR. Just one minor comment on godoc. Once fixed, I will get it merged.
sse.go
Outdated
|
|
||
| // SetBody method sets body value to the [EventSource] instance | ||
| // | ||
| // es.SetBody([]byte(`{"test":"put_data"}`),) |
Member
There was a problem hiding this comment.
@vegetablechicken233 This good example requires a correction based on method input type. Also, it has a syntax issue: , is present near the closing curve bracket.
es.SetBody(strings.NewReader(`{"test":"put_data"}`))
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v3 #988 +/- ##
=======================================
Coverage 99.81% 99.82%
=======================================
Files 18 18
Lines 3885 3896 +11
=======================================
+ Hits 3878 3889 +11
Misses 5 5
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jeevatkm
approved these changes
Mar 22, 2025
jeevatkm
added a commit
that referenced
this pull request
Jan 27, 2026
Co-authored-by: xiyuliu <xiyuliu@bytedance.com> Co-authored-by: Jeevanandam M. <jeeva@myjeeva.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make HTTP Method configurable and add corresponding test functions.
It should be noted that to ensure backward compatibility, the "method" field does not perform empty validation, but is set to "GET" by default (to align with the old version).
In addition, type of "body" field is temporarily set to "io.Reader" (it seems a bit too early to add support for "any"~
Separated from PR #985