{"id":72906,"library":"okhttp-ws","title":"OkHttp WebSocket","description":"An HTTP+SPDY client for Android and Java applications with WebSocket support.","status":"active","version":"2.7.5","language":"java","source_language":null,"source_url":"https://github.com/square/okhttp","tags":["http","spdy","websocket","android","java"],"install":[{"cmd":"<dependency>\n  <groupId>com.squareup.okhttp</groupId>\n  <artifactId>okhttp-ws</artifactId>\n  <version>2.7.5</version>\n</dependency>","lang":"xml","label":"Maven"},{"cmd":"implementation 'com.squareup.okhttp:okhttp-ws:2.7.5'","lang":"groovy","label":"Gradle"}],"dependencies":[],"imports":[{"symbol":"WebSocket","correct":"com.squareup.okhttp.ws.WebSocket"}],"quickstart":{"code":"import com.squareup.okhttp.ws.WebSocket;\nimport com.squareup.okhttp.OkHttpClient;\nimport com.squareup.okhttp.Request;\n\nOkHttpClient client = new OkHttpClient();\nRequest request = new Request.Builder().url(\"ws://example.com/ws\").build();\nWebSocket ws = client.newWebSocket(request, new WebSocketListener() {\n    @Override\n    public void onOpen(WebSocket webSocket, Response response) {\n        System.out.println(\"Connected\");\n    }\n});","lang":"java","description":"Minimal WebSocket client using OkHttp"},"warnings":[{"fix":"Migrate to OkHttp 3.x+ and use okhttp3.WebSocket.","message":"OkHttp-ws is deprecated in favor of OkHttp 3.x+ built-in WebSocket support.","severity":"breaking","affected_versions":">=2.7.5"}],"env_vars":null,"search_vec":"'android':8,18 'applic':11 'client':6 'http':4,15 'java':10,19 'okhttp':1 'spdi':5,16 'support':14 'websocket':2,13,17","created_at":"2026-06-17T18:44:45.579759+00:00","updated_at":"2026-06-17T18:44:45.579759+00:00","problems":[],"ecosystem":"maven","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/square/okhttp","github":"https://github.com/square/okhttp","docs":"https://appdoc.app/artifact/com.squareup.okhttp/okhttp-ws/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking","http-client"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}