Registry / networking / okhttp-ws

okhttp-ws

JSON →
library2.7.5javamavenunverified

An HTTP+SPDY client for Android and Java applications with WebSocket support.

<dependency> <groupId>com.squareup.okhttp</groupId> <artifactId>okhttp-ws</artifactId> <version>2.7.5</version> </dependency>
INSTALL
IMPORT
SIG · OKHTTP-WS
O
okhttp-ws
networkingjavav2.7.5
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.

WebSocket
com.squareup.okhttp.ws.WebSocket

Minimal WebSocket client using OkHttp

import com.squareup.okhttp.ws.WebSocket; import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url("ws://example.com/ws").build(); WebSocket ws = client.newWebSocket(request, new WebSocketListener() { @Override public void onOpen(WebSocket webSocket, Response response) { System.out.println("Connected"); } });
Debug
Known issues
breakingOkHttp-ws is deprecated in favor of OkHttp 3.x+ built-in WebSocket support.
fix
Migrate to OkHttp 3.x+ and use okhttp3.WebSocket.
affects: >=2.7.5
Upgrade
Version history
2.7.5latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
okhttp-ws — mvn dependency:get okhttp-ws · libregistry