<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3" -->

---
title: Web Sockets now shipping in OkHttp 3.5! | daily.dev
description: OkHttp 3.5 introduces stable, native WebSocket support, replacing the previously unstable `okhttp-ws` artifact. The API allows connecting via `newWebSocket()`,...
canonical: https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Web Sockets now shipping in OkHttp 3.5! | daily.dev
og:description: OkHttp 3.5 introduces stable, native WebSocket support, replacing the previously unstable `okhttp-ws` artifact. The API allows connecting via `newWebSocket()`,...
og:url: https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3
og:image: https://api.daily.dev/og/posts/nlkyAdOP3.png
og:image:alt: Web Sockets now shipping in OkHttp 3.5!
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Sockets now shipping in OkHttp 3.5!

**[Jake Wharton](https://daily.dev/sources/jakewharton)** · 2 min read · 0 upvotes · 0 comments

## Summary

OkHttp 3.5 introduces stable, native WebSocket support, replacing the previously unstable `okhttp-ws` artifact. The API allows connecting via `newWebSocket()`, sending text or binary messages with `send(String)` or `send(ByteString)`, and receiving server messages through a listener callback. OkHttp handles sending on its own thread, making it safe to call from any thread including Android's main thread. Add `com.squareup.okhttp3:okhttp:3.5.0` to your build.gradle to use it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://developer.squareup.com/blog/web-sockets-now-shipping-in-okhttp-3-5>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#java](https://daily.dev/tags/java), [#android](https://daily.dev/tags/android), [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Web Sockets now shipping in OkHttp 3.5!","url":"https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3"},"datePublished":"2026-07-05T07:13:17.382Z","dateModified":"2026-07-05T07:14:25.448Z","description":"OkHttp 3.5 introduces stable, native WebSocket support, replacing the previously unstable `okhttp-ws` artifact. The API allows connecting via `newWebSocket()`,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7db34ef465c664787fa0a5e1ac631688?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7db34ef465c664787fa0a5e1ac631688?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Jake Wharton","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Jake Wharton","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/jakewharton"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/web-sockets-now-shipping-in-okhttp-3-5--nlkyadop3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,java,android,networking","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Jake Wharton","item":"https://daily.dev/sources/jakewharton"},{"@type":"ListItem","position":3,"name":"Web Sockets now shipping in OkHttp 3.5!"}]}
```

