Registry / http-client / okhttp-sse

okhttp-sse

JSON →
library5.3.2javamavenunverified

OkHttp extension for consuming Server-Sent Events (SSE) streams in Java and Kotlin applications.

<dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp-sse</artifactId> <version>5.3.2</version> </dependency>
INSTALL
IMPORT
SIG · OKHTTP-SSE
O
okhttp-sse
http-clientjavav5.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EventSource
okhttp3.sse.EventSource

Creates an EventSource to listen for SSE events from a URL.

import okhttp3.*; import okhttp3.sse.*; OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url("https://example.com/events").build(); EventSource.Factory factory = EventSources.createFactory(client); EventSource eventSource = factory.newEventSource(request, new EventSourceListener() { @Override public void onEvent(EventSource eventSource, String id, String type, String data) { System.out.println("Received: " + data); } });
Debug
Known issues
breakingOkHttp-SSE requires OkHttp 3.x or 4.x; ensure compatibility with your OkHttp version.
fix
Use OkHttp 4.x (com.squareup.okhttp3:okhttp) with okhttp-sse 5.x.
affects: >=5.0.0
Upgrade
Version history
5.3.2latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
okhttp-sse — mvn dependency:get okhttp-sse · libregistry