Tag: Networking
All the articles with the tag "Networking".
-
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.
-
HTTP Methods Explained — HEAD, POST, PUT, and PATCH
Understand the purpose of HEAD, POST, PUT, and PATCH HTTP methods — when to use each, how HEAD avoids downloading a body to check metadata, how POST creates resources, and the difference between PUT replacing a full record and PATCH updating specific fields.
-
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.
-
Parallel Network Calls and Error Handling in Kotlin Flow — zip, catch, and emitAll
Learn how zip runs two network calls in parallel in Kotlin Flow, how catch handles errors at the pipeline level and per-task level, and how emitAll provides fallback values when one call fails.