Tag

OkHttp

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 10, 2024 · Mobile Development

Using Kotlin Coroutines, Flow, Retrofit, and OkHttp for Network Requests in Android

This article explains how to combine Kotlin coroutines, Flow, Retrofit, and OkHttp to create a clean, reactive, and maintainable network request framework for Android applications, covering concepts, core principles, and practical code examples.

AndroidFlowKotlin
0 likes · 16 min read
Using Kotlin Coroutines, Flow, Retrofit, and OkHttp for Network Requests in Android
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 16, 2024 · Backend Development

Master Java HTTP Clients: From HttpClient to OkHttp and WebClient

This article introduces four Java HTTP client libraries—Java HttpClient, Apache HttpComponents, OkHttp, and Spring WebClient—explains their key features, provides async GET and sync POST code examples for each, and offers guidance on selecting the right client for Spring Boot and plain Java projects.

Apache HttpClientHTTP ClientOkHttp
0 likes · 14 min read
Master Java HTTP Clients: From HttpClient to OkHttp and WebClient
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 11, 2024 · Backend Development

10 Ways to Call Third-Party APIs in Spring Boot 3.3 – Full Code Guide

This article reviews ten practical methods for invoking third-party HTTP services in Spring Boot 3.3, covering plain JDK URL, HttpClient, Apache HttpClient, OkHttp, RestTemplate, WebClient, RestClient, Http Interface, OpenFeign, and Gateway proxy, each with code samples and key advantages.

API IntegrationHTTP ClientOkHttp
0 likes · 13 min read
10 Ways to Call Third-Party APIs in Spring Boot 3.3 – Full Code Guide
Java Captain
Java Captain
Jan 31, 2024 · Backend Development

Replacing OpenFeign with Apache HttpClient, OkHttp, and RestTemplate in Spring Applications

This article explains why and how to replace OpenFeign with native Spring HttpInterface alternatives such as Apache HttpClient, OkHttp, and RestTemplate, covering security motivations, configuration details, code examples, and practical recommendations for microservice remote calls.

HttpClientOkHttpSpring
0 likes · 12 min read
Replacing OpenFeign with Apache HttpClient, OkHttp, and RestTemplate in Spring Applications
Java Architecture Diary
Java Architecture Diary
Jan 10, 2024 · Backend Development

Boost Your Java HTTP Calls with mica-http: Fast, Fluent, and Secure

This article introduces mica-http, a lightweight Fluent‑style HTTP client built on OkHttp, walks through dependency setup, synchronous and asynchronous usage, global logging, custom client and cookie management, presents performance benchmarks, and highlights its automatic resource handling for safe, high‑performance requests.

Fluent APIHTTPOkHttp
0 likes · 7 min read
Boost Your Java HTTP Calls with mica-http: Fast, Fluent, and Secure
Java Architect Essentials
Java Architect Essentials
Nov 28, 2023 · Backend Development

Various Ways to Send HTTP Requests in Java

This article introduces multiple Java approaches for sending HTTP GET and POST requests, covering the built‑in HttpURLConnection class, Apache HttpClient, Square's OkHttp, and Spring's RestTemplate, with step‑by‑step explanations and complete code examples for each method.

HTTPHttpClientOkHttp
0 likes · 8 min read
Various Ways to Send HTTP Requests in Java
Architect
Architect
Oct 8, 2023 · Backend Development

Deep Dive into OkHttp: Core Principles, Interceptor Chain, and Practical Usage

This article provides a comprehensive analysis of OkHttp’s source code, explaining its request‑execution flow, layered architecture, interceptor chain design, and demonstrates how to implement custom interceptors for unified request handling in Java and Android projects.

AndroidDesignPatternHTTP
0 likes · 15 min read
Deep Dive into OkHttp: Core Principles, Interceptor Chain, and Practical Usage
vivo Internet Technology
vivo Internet Technology
May 17, 2023 · Mobile Development

Deep Dive into OkHttp: Core Principles, Interceptor Chain, and Practical Usage

By dissecting OkHttp’s source, the article explains its layered architecture, the interceptor‑chain implementation of the Chain‑of‑Responsibility pattern, and shows how developers can add custom interceptors—such as authentication headers—to uniformly handle requests, retries, caching, and network I/O in Java and Android.

AndroidHTTPInterceptor
0 likes · 16 min read
Deep Dive into OkHttp: Core Principles, Interceptor Chain, and Practical Usage
Architect's Guide
Architect's Guide
May 14, 2023 · Backend Development

OKHttpUtil: A Lightweight HTTP Client Wrapper for Java and Spring Boot

This article introduces OKHttpUtil, a concise Java wrapper for the OkHttp library, outlines its key features, provides Maven dependency instructions, demonstrates GET, POST, file upload, download, and chained request usage, and shows how to integrate and configure it in Spring Boot as well as quickly build external API clients such as eBay.

API WrapperBackend DevelopmentHTTP Client
0 likes · 11 min read
OKHttpUtil: A Lightweight HTTP Client Wrapper for Java and Spring Boot
HaoDF Tech Team
HaoDF Tech Team
Feb 2, 2023 · Mobile Development

Android Client Network Optimization: Framework Unification, HttpDns Integration, and Performance Enhancements

This article details how an Android team unified multiple network libraries into OkHttp, integrated HttpDns to bypass carrier DNS hijacking, migrated to HTTPS and HTTP/2, and applied a series of performance and security optimizations that markedly improved request speed, reliability, and user experience across diverse mobile network conditions.

AndroidHTTP2HTTPS
0 likes · 22 min read
Android Client Network Optimization: Framework Unification, HttpDns Integration, and Performance Enhancements
Code Ape Tech Column
Code Ape Tech Column
Nov 29, 2022 · Backend Development

Simplified HTTP Requests with OKHttpUtil in Java and Spring Boot

This article introduces OKHttpUtil, a lightweight wrapper for OkHttp that simplifies HTTP GET, POST, file upload/download, and chainable requests in Java, provides Maven integration, Spring Boot configuration, and demonstrates how to encapsulate external APIs such as eBay with concise code examples.

API WrapperHTTP ClientOkHttp
0 likes · 10 min read
Simplified HTTP Requests with OKHttpUtil in Java and Spring Boot
Sohu Tech Products
Sohu Tech Products
Nov 9, 2022 · Mobile Development

Integrating AndroidMonitor for In‑App Network Packet Capture on Android

This article introduces AndroidMonitor, a lightweight Android packet‑capture library, explains how to add its monitor and monitor‑plugin dependencies, configure ProGuard, customize entry names, ports and logos, and optionally use AndroidLocalService to expose captured data via a local socket for both mobile and PC UI visualization.

AndroidKotlinLocal Service
0 likes · 9 min read
Integrating AndroidMonitor for In‑App Network Packet Capture on Android
Selected Java Interview Questions
Selected Java Interview Questions
Oct 19, 2022 · Backend Development

How to Add Request and Response Interceptors to OpenFeign with OkHttp in Spring Cloud

This article explains how to replace OpenFeign's default HTTP client with OkHttp, configure request and response interceptors, and customize OkHttpClientBuilder in Spring Cloud, providing detailed code examples and configuration steps for effective interceptor implementation.

InterceptorOkHttpbackend
0 likes · 6 min read
How to Add Request and Response Interceptors to OpenFeign with OkHttp in Spring Cloud
Selected Java Interview Questions
Selected Java Interview Questions
Sep 6, 2022 · Backend Development

Various Ways to Call Third‑Party HTTP APIs in Java

This article explains multiple approaches for invoking third‑party HTTP APIs in Java, covering JDK HttpURLConnection, Apache HttpClient, CloseableHttpClient, SpringBoot RestTemplate, and OkHttp, with detailed code examples, configuration steps, and usage patterns for GET and POST requests.

APIHTTPHttpClient
0 likes · 27 min read
Various Ways to Call Third‑Party HTTP APIs in Java
Top Architect
Top Architect
Aug 29, 2022 · Mobile Development

Understanding OkHttp: Request Flow, Dispatcher, Interceptors, Connection Reuse, and Design Patterns

This article provides a comprehensive overview of OkHttp, covering its overall request process, the role of the dispatcher, how application and network interceptors work, TCP connection reuse via the connection pool, idle‑connection cleanup, key advantages, and the design patterns employed in the framework.

AndroidConnection PoolInterceptor
0 likes · 15 min read
Understanding OkHttp: Request Flow, Dispatcher, Interceptors, Connection Reuse, and Design Patterns
Beike Product & Technology
Beike Product & Technology
Apr 8, 2022 · Mobile Development

Design and Implementation of a Non‑Intrusive Page Network Request Preloading Framework for Android

The article presents a non‑intrusive Android framework that preloads page network requests in parallel with page initialization, describing its three‑part architecture, routing and network interceptors, code implementation, and performance gains that can reduce overall page load time by up to 100 ms.

AndroidNetwork PreloadingOkHttp
0 likes · 12 min read
Design and Implementation of a Non‑Intrusive Page Network Request Preloading Framework for Android
Snowball Engineer Team
Snowball Engineer Team
Oct 28, 2021 · Mobile Development

Redesigning Snowball's Android Network Framework with OkHttp and Retrofit: Architecture, Issues, and Migration

This article details the redesign of Snowball's Android network framework using OkHttp and Retrofit, covering motivations, architectural layers, solutions for domain switching, custom annotations, data validation, migration strategy, and the resulting performance and maintainability improvements.

AndroidKotlinOkHttp
0 likes · 17 min read
Redesigning Snowball's Android Network Framework with OkHttp and Retrofit: Architecture, Issues, and Migration
Top Architect
Top Architect
Aug 27, 2021 · Backend Development

HttpClient vs OkHttp: Usage, Timeout Settings, Performance Comparison and Code Samples

This article compares Apache HttpClient and OkHttp for Java backend development, explaining how to create clients, configure timeouts, perform GET/POST/PUT/DELETE requests, upload files, cancel requests, and presents performance test results with code examples for each library.

HttpClientOkHttpPerformance
0 likes · 9 min read
HttpClient vs OkHttp: Usage, Timeout Settings, Performance Comparison and Code Samples
Sohu Tech Products
Sohu Tech Products
Jul 14, 2021 · Mobile Development

Resolving IllegalStateException: closed During Android File Upload with RxHttp and OkHttp

This article details a real‑world Android file‑upload failure caused by the Android Studio Profiler’s OkHttp3Interceptor closing the request’s BufferedSink, explains the debugging steps taken, and provides code modifications to the ProgressRequestBody to prevent the IllegalStateException and ensure correct upload progress tracking.

AndroidFile UploadNetwork Interceptor
0 likes · 14 min read
Resolving IllegalStateException: closed During Android File Upload with RxHttp and OkHttp