Skip to content

FlowSseClient add sse connect headers #136

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

Open
qngl opened this issue Apr 10, 2025 · 1 comment
Open

FlowSseClient add sse connect headers #136

qngl opened this issue Apr 10, 2025 · 1 comment

Comments

@qngl
Copy link

qngl commented Apr 10, 2025

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

public void subscribe(String url, String sseHeaders, SseEventHandler eventHandler) {
	HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create(url))
		.header("Accept", "text/event-stream")
		.header("Cache-Control", "no-cache")
                .headers(sseHeaders)
		.GET()
		.build();

Current Behavior

public void subscribe(String url, SseEventHandler eventHandler) {
	HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create(url))
		.header("Accept", "text/event-stream")
		.header("Cache-Control", "no-cache")
		.GET()
		.build();

Context

No way to do authentication for the SSE connection

@renxiawang
Copy link
Contributor

Duplicate of #68 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants