Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 803 Bytes

README.MD

File metadata and controls

23 lines (18 loc) · 803 Bytes

okhttp-ktx

Collection of Kotlin extensions for OkHttp

Obtain this library via Github or Jitpack using Maven or Gradle

Features

  • enhanced proxy support

Usage Examples

Okhttp client using a socks proxy with credentials

val withCredentials = socksProxy.extended(UsernamePasswordCredentials(username, password))
val proxiedOkhttpClient = okhttpClient.withProxy(withCredentials)

Proxy provider and call manager

val rotatingProvider = RotatingProxyProvider(proxies)
val nextProxy = rotatingProvider.next()

val callManager = SimpleProxyCallManager(okhttpClient, rotatingProvider)
callManager.newCall(request).execute()