Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for WithContext (0.22 sec)

  1. okhttp-coroutines/README.md

    OkHttp Coroutines
    =================
    
    Support for Kotlin clients using coroutines.
    
    ```kotlin
    val call = client.newCall(request)
    
    call.executeAsync().use { response ->
      withContext(Dispatchers.IO) {
        println(response.body?.string())
      }
    }
    ```
    
    This is implemented using `suspendCancellableCoroutine`
    but uses the standard Dispatcher in OkHttp. This means
    that by default Kotlin's Dispatchers are not used.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Nov 09 15:47:27 GMT 2023
    - 609 bytes
    - Viewed (0)
Back to top