An open API service indexing awesome lists of open source software.

https://github.com/werbhelius/okcurl

cURL log for okhttp!
https://github.com/werbhelius/okcurl

android curl kotlin okhttp3

Last synced: 4 months ago
JSON representation

cURL log for okhttp!

Awesome Lists containing this project

README

        

# okcurl
> curl log for okhttp!

```gradle
implementation 'com.werb.okcurl:okcurl:0.0.1'
```

add `OkCurl` Interceptor for okhttp

```kotlin
val curlInterceptor = OkCurl("RequestService")
val client = OkHttpClient.Builder()
.addInterceptor(curlInterceptor)
.build()
val requestType = intent.getStringExtra(REQUEST_TYPE)
val request = RequestFactory.getRequest(requestType)
try {
client.newCall(request).execute()
} catch (e: IOException) {
e.printStackTrace()
}
```