Registry / http-client / okhttp-urlconnection

okhttp-urlconnection

JSON →
library5.3.2javamavenunverified

OkHttp-backed implementation of java.net.URLConnection for seamless integration with OkHttp's HTTP client.

<dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp-urlconnection</artifactId> <version>5.3.2</version> </dependency>
INSTALL
IMPORT
SIG · OKHTTP-URLCONNECTI
O
okhttp-urlconnection
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.

OkUrlFactory
okhttp3.OkUrlFactory

Opens an HTTP connection using OkHttp via URLConnection.

import okhttp3.OkHttpClient; import okhttp3.OkUrlFactory; import java.net.URL; import java.net.HttpURLConnection; public class Main { public static void main(String[] args) throws Exception { OkHttpClient client = new OkHttpClient(); OkUrlFactory factory = new OkUrlFactory(client); HttpURLConnection conn = (HttpURLConnection) factory.open(new URL("http://example.com")); System.out.println(conn.getResponseCode()); } }
Debug
Known issues
breakingOkHttp URLConnection is deprecated in OkHttp 4.x; use OkHttp's native API instead.
fix
Replace with OkHttpClient.newCall(Request) for direct HTTP calls.
affects: >=4.0.0
Upgrade
Version history
5.3.2latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
okhttp-urlconnection — mvn dependency:get okhttp-urlconnection · libregistry