Repository navigation
Conversation
joker23
force-pushed
the
skz/sdk-3440/http-sse-client-web
branch
2 times, most recently
from
November 4, 2026 15:19
ca7e1e3 to
dcf312a
Compare
joker23
force-pushed
the
skz/sdk-3440/http-sse-client-web
branch
from
November 4, 2026 19:16
dcf312a to
2d6ef48
Compare
joker23
marked this pull request as ready for review
November 5, 2026 15:38
Comment on lines
+215
to
+217
| return http_client.HttpSseClient(uri, eventTypes, mergedHeaders, | ||
| connectTimeout, readTimeout, body, httpMethod.toString(), logger, | ||
| uriProvider: uriProvider); |
Contributor
There was a problem hiding this comment.
🟨 Web stream credentials enter debug logs
When SSEClient.http receives a token-bearing URL and a logger, StateConnecting logs the full URL. Browser logs can expose that token.
Was this helpful? React with 👍 or 👎 to provide feedback.
Contributor
Author
There was a problem hiding this comment.
This is pre-existing and whatever is in the url string should not be an actual secret.
joker23
marked this pull request as draft
November 5, 2026 16:42
joker23
marked this pull request as ready for review
November 5, 2026 21:01
joker23
commented
Nov 5, 2026
| relative: true | ||
| source: path | ||
| version: "2.0.1" | ||
| version: "3.0.1" |
Contributor
Author
There was a problem hiding this comment.
NOTE: updating this to the latest in main
kinyoklion
approved these changes
Nov 6, 2026
This branch has not been deployed
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.
Summary
SSEClient.http. It always returns the HTTP-based client, on every platform including web. On web it streams withfetch()throughpackage:http, so it can send a request body, a method other thanGET, and custom headers, and it can report HTTP errors. The default client on web stays the browserEventSource.SSEClient.httpsendsacceptandcache-control: no-cache, like the LaunchDarkly browser SDK. Thecache-controlheader stops a browser from serving a cached stream response on a reconnect. It costs a preflight request, which the streaming service allows and the browser caches for five minutes.httpto^1.6.0. Older versions use XHR on web and cannot stream.SSEClient, so classes that implement it keep compiling. The default client is unchanged on every platform.Verification and limits
SSEClient.httpcompiles withdart compile js.close()aborts the in-flight fetch.This is the first PR in a stack. The next PR adds the
useHttpStreamingOnWeboption tocommon_client.Note
Overview
Adds
SSEClient.http, a factory that always uses theHttpSseClientpath (including on web viapackage:http/fetch()), so callers can use custom headers, non-GET methods, request bodies, and HTTP error reporting where the default webEventSourceclient cannot. The defaultSSEClient(...)factory is unchanged on every platform.Web-specific defaults for
SSEClient.httplive inhttpSseClientHeaders:acceptandcache-control: no-cache(nouser-agent), aligned with the LaunchDarkly browser SDK; caller headers still override defaults.httpis raised to^1.6.0for web streaming, and CI runshttp_sse_headers_test.darton Chrome.Also fixes a timeout path bug in
state_connecting.dartwhereclient.closewas referenced instead ofclient.close(), and documents howSSEClient.httpdiffers from native webEventSourcefor errors and CORS.Reviewed by Cursor Bugbot for commit 25bd0b4. Bugbot is set up for automated code reviews on this repo. Configure here.