feat: Add ability to control SSE request method and body#51
feat: Add ability to control SSE request method and body#51keelerm84 merged 6 commits intolaunchdarkly:mainfrom
Conversation
|
Thank you for your interest and contribution. I do not have the capacity to review this PR quite yet, but I will get to it ASAP. |
|
i need this feature as well. when will it get merged? Thanks |
|
Hi! I also am working on something that could really benefit from this feature, thanks ^^ |
|
Went ahead and added support for PUT method as well: #64 Can we get a review on both PRs @keelerm84 if possible so we can get these features out? |
|
@Gao-Jun and @saada I have made some modifications to this PR. Instead of inferring the method from the presence of a payload, we are making those 2 separately provided items. This is more inline with some of our other event source SDKs. Additionally, the request payload can be either a simple static value, or the result of a executing some payload function. In a separate PR, I will introduce the ability to disable the retry functionality, which I also think should be explicitly defined rather than inferred. |
|
@keelerm84 Thank you for your work. |
I had mentioned above I would make a separate PR for that. Sorry I didn't have time to do it previously, but I have just merged it here. |
🤖 I have created a release *beep* *boop* --- ## [2.3.0](2.2.6...2.3.0) (2025-08-28) ### Features * Add ability to control SSE request method and body ([#51](#51)) ([7c65c4b](7c65c4b)) * Add ability to disable retries ([#67](#67)) ([f272b90](f272b90)) * Allow providing HTTP client option settings ([#68](#68)) ([1d9b31c](1d9b31c)) ### Bug Fixes * Handle redirect on 301 and 307 ([7d342e7](7d342e7)) * Pass through proxy user and password if present ([#69](#69)) ([0bb36f3](0bb36f3)) * Support field without colon in event ([7d342e7](7d342e7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Background
Recently, I'm working on an SSE client to Tencent LKE interface, which use a POST request and reply SSE AIGC content.
ruby-eventsourceis a good gem to handle SSE replies, but cannot send request via POST.Solution
This PR add a new param
payloadtoinitializemethod. Some behaviors will be changed ifpayloadis set.payloadcontent