-
-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat[sse]: make method and body configurable #985
feat[sse]: make method and body configurable #985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vegetablechicken233 Thanks for the PR.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v3 #985 +/- ##
=======================================
Coverage 99.81% 99.82%
=======================================
Files 18 18
Lines 3882 3893 +11
=======================================
+ Hits 3875 3886 +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:
|
BTW I use "len(es.onEvent) == 0 " check instead of "if _, found := es.onEvent[defaultEventName]" check. Sometimes the implementation of the sse server is not standard, and there is no event with the type of message. |
@vegetablechicken233 Can you please create a separate PR for this method check changes? |
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"~