Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 59 for response (0.51 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

                ?: throw IOException("Failed to authenticate with proxy")
    
              if ("close".equals(response.header("Connection"), ignoreCase = true)) {
                return nextRequest
              }
            }
    
            else -> throw IOException("Unexpected response code for CONNECT: ${response.code}")
          }
        }
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_2x.md

        ```
    
     *  New: Make the content-type header optional for request bodies.
     *  New: `Response.isSuccessful()` is a convenient API to check response codes.
     *  New: The response body can now be read outside of the callback. Response
        bodies must always be closed, otherwise they will leak connections!
     *  New: APIs to create multipart request bodies (`MultipartBuilder`) and form
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun response() {
        val response: Response = Response.Builder().build()
        val request: Request = response.request
        val protocol: Protocol = response.protocol
        val code: Int = response.code
        val successful: Boolean = response.isSuccessful
        val message: String = response.message
        val handshake: Handshake? = response.handshake
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  4. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

        val call = client.newCall(request)
        val response =
          Response.Builder().request(request).code(200).message("").protocol(Protocol.HTTP_2)
            .build()
        val listener = loggingEventListenerFactory.create(call)
        listener.cacheConditionalHit(call, response)
        listener.cacheHit(call, response)
        listener.cacheMiss(call)
        listener.satisfactionFailure(call, response)
        logRecorder
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

          var response: Response
          var closeActiveExchange = true
          try {
            if (call.isCanceled()) {
              throw IOException("Canceled")
            }
    
            try {
              response = realChain.proceed(request)
              newRoutePlanner = true
            } catch (e: IOException) {
              // An attempt to communicate with a server failed. The request may have been sent.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      }
    
      @Throws(IOException::class)
      internal fun checkUpgradeSuccess(
        response: Response,
        exchange: Exchange?,
      ) {
        if (response.code != 101) {
          throw ProtocolException(
            "Expected HTTP 101 response but was '${response.code} ${response.message}'",
          )
        }
    
        val headerConnection = response.header("Connection")
        if (!"Upgrade".equals(headerConnection, ignoreCase = true)) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    import okhttp3.RequestBody
    import okhttp3.Response
    import okhttp3.ResponseBody
    import okhttp3.internal.http2.Header
    import okio.Buffer
    import okio.BufferedSource
    import okio.Source
    
    @JvmField
    internal val EMPTY_HEADERS: Headers = commonEmptyHeaders
    
    @JvmField
    internal val EMPTY_REQUEST: RequestBody = commonEmptyRequestBody
    
    @JvmField
    internal val EMPTY_RESPONSE: ResponseBody = commonEmptyResponse
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/DuplexTest.kt

              .build(),
          )
        call.execute().use { response ->
          assertThat(response.headers)
            .isEqualTo(headersOf("h1", "v1", "h2", "v2"))
          val responseBody = response.body.source()
          assertThat(responseBody.readUtf8(2)).isEqualTo("ok")
          assertThat(responseBody.exhausted()).isTrue()
          assertThat(response.trailers()).isEqualTo(headersOf("trailers", "boom"))
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  9. CHANGELOG.md

        val request = Request(
          url = "https://cash.app/".toHttpUrl(),
        )
        ```
    
     *  New: `Response.body` is now non-null. This was generally the case in OkHttp 4.x, but the Kotlin
        type declaration was nullable to support rare cases like the body on `Response.cacheResponse`,
        `Response.networkResponse`, and `Response.priorResponse`. In such cases the body is now
        non-null, but attempts to read its content will fail.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

          val response =
            Response.Builder()
              .code(101)
              .message("OK")
              .request(Request.Builder().url(url).build())
              .headers(responseHeaders!!)
              .protocol(Protocol.HTTP_1_1)
              .build()
          webSocket =
            RealWebSocket(
              taskFaker.taskRunner,
              response.request,
              listener,
              random!!,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
Back to top