-
Notifications
You must be signed in to change notification settings - Fork 7.3k
feature: SSE endpoints #4462
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
base: trunk
Are you sure you want to change the base?
feature: SSE endpoints #4462
Conversation
|
I think this can probably be entirely implemented in a call adapter with no changes to the core, but I'd have to try it. |
|
We might have more than one adapter for SSE (for example RxJava & Kotlinx coroutines), so the basic definition like |
|
Call adapters can delegate to each other. They do not need to be in the core. |
f3ded01 to
3fc685e
Compare
|
I planned to add a callback style for |
|
@JakeWharton Please review current work of this for further change/improvement/completion. |
297c7df to
03ef06e
Compare
Now it requires the default callback style adapter.
|
Current usage: @Streaming
@GET
fun ktxFlow(): Flow<ServerSentEvent<String, String, String>>
@Streaming
@GET
fun jucFlow(): Flow.Publisher<ServerSentEvent<String, String, String>>
@Streaming
@GET
fun callback(): EventSource<String, String, String>The fields of |
Prototype (my demand):
Pending:
@SSEcan replace@GET)id,type,datafor exampleInt?forid, enum fortypeand JSONdata?java.util.concurrent.Flow(Java 9+) /java.util.stream.Stream(Java 8+) might be the integrated ones... ButStreamis not designed for tasks like this.These questions need to be answered before actual works.
closes #1029