Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for responseHeader (0.15 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt

        client.newCall(request)
          .execute()
          .use { response ->
            if (!response.isSuccessful) {
              val responseHeaders = response.headers
              for (i in 0 until responseHeaders.size) {
                println(responseHeaders.name(i) + ": " + responseHeaders.value(i))
              }
              throw IOException("Unexpected code $response")
            }
            println(response.body.string())
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.8K bytes
    - Viewed (5)
Back to top