Tag: OkHttp
All the articles with the tag "OkHttp".
-
OkHttp Connection Pooling and Retrofit with Multiple Base URLs
Understand OkHttp connection pooling — how it saves the DNS and TLS handshake overhead on repeat requests — and the three approaches for using Retrofit with multiple base URLs, with a decision guide for when to use one versus two OkHttp instances.
-
OkHttp vs Retrofit — How Android Networking Works Internally
Understand the difference between OkHttp and Retrofit — OkHttp is the HTTP engine that makes network calls, Retrofit is a wrapper that adds adapter pattern support, automatic parsing, and threading integration. Covers the history from HttpUrlConnection to OkHttp, and why Moshi is faster than Gson.
-
HTTP Read/Write Timeouts and OAuth 2.0 Explained
Understand the common misconception about read timeout — it is a per-chunk timer, not a total response timer — how write timeout works for uploads, and how OAuth 2.0 separates authentication from authorization to avoid sending credentials on every request.