Registry / http-client / okhttp

okhttp

JSON →
library5.3.2javamavenunverified

Square's efficient HTTP client for Java and Kotlin with HTTP/2 and connection pooling.

<dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>5.3.2</version> </dependency>
INSTALL
IMPORT
SIG · OKHTTP
O
okhttp
http-clientjavav5.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OkHttpClient
okhttp3.OkHttpClient

Minimal HTTP GET request using OkHttp.

import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; public class Example { public static void main(String[] args) throws Exception { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url("http://example.com").build(); Response response = client.newCall(request).execute(); System.out.println(response.body().string()); } }
Debug
Known issues
breakingOkHttp 5.x requires Java 8+; older versions support Java 7.
fix
Use OkHttp 4.x for Java 7 compatibility.
affects: >=5.0
Upgrade
Version history
5.3.2latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
32 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
okhttp — mvn dependency:get okhttp · libregistry