Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 263 for response (0.18 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/PushPromise.kt

    import okhttp3.Headers
    
    /** An HTTP request initiated by the server. */
    @ExperimentalOkHttpApi
    class PushPromise(
      val method: String,
      val path: String,
      val headers: Headers,
      val response: MockResponse,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 874 bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        val response = call.execute()
    
        // Body contains nothing.
        assertThat(response.body.bytes().size).isEqualTo(0)
        assertThat(response.body.contentLength()).isEqualTo(0)
    
        // Content-Length header doesn't exist in a 204 response.
        assertThat(response.header("content-length")).isNull()
        assertThat(response.code).isEqualTo(204)
        val request = server.takeRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

        server.enqueue(MockResponse(body = "response that will never be received"))
        val response = executeSynchronously("/")
        response.assertFailure(
          // JDK 11 response to the FAIL_HANDSHAKE:
          SSLException::class.java,
          // RI response to the FAIL_HANDSHAKE:
          SSLProtocolException::class.java,
          // Android's response to the FAIL_HANDSHAKE:
          SSLHandshakeException::class.java,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Cache.kt

          }
        }
    
        constructor(response: Response) {
          this.url = response.request.url
          this.varyHeaders = response.varyHeaders()
          this.requestMethod = response.request.method
          this.protocol = response.protocol
          this.code = response.code
          this.message = response.message
          this.responseHeaders = response.headers
          this.handshake = response.handshake
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/RecordingCallback.kt

      @Synchronized
      override fun onResponse(
        call: Call,
        response: Response,
      ) {
        val body = response.body.string()
        responses.add(RecordedResponse(call.request(), response, null, body, null))
        (this as Object).notifyAll()
      }
    
      /**
       * Returns the recorded response triggered by `request`. Throws if the response isn't
       * enqueued before the timeout.
       */
      @Synchronized
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

      /** Close connection after writing half of the response body (if present). */
      object DisconnectDuringResponseBody : SocketPolicy
    
      /**
       * Process the response without even attempting to reading the request body. For HTTP/2 this will
       * send [http2ErrorCode] after the response body or trailers. For HTTP/1 this will close the
       * socket after the response body or trailers.
       */
      class DoNotReadRequestBody(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          }
    
        /**
         * Adds an HTTP 1xx response to precede this response. Note that this response's
         * [headers delay][headersDelay] applies after this response is transmitted. Set a
         * headers delay on that response to delay its transmission.
         */
        fun addInformationalResponse(response: MockResponse) =
          apply {
            informationalResponses += response
          }
    
        fun add100Continue() =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     *
     * Both this class and [Response] implement [Closeable]. Closing a response simply
     * closes its response body. If you invoke [Call.execute] or implement [Callback.onResponse] you
     * must close this body by calling any of the following methods:
     *
     * * `Response.close()`
     * * `Response.body().close()`
     * * `Response.body().source().close()`
     * * `Response.body().charStream().close()`
     * * `Response.body().byteStream().close()`
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  9. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

              .build()
    
          val response = client.newCall(request).execute()
    
          response.use {
            assertEquals(Protocol.HTTP_2, response.protocol)
            assertEquals(200, response.code)
            assertEquals("com.google.android.gms.org.conscrypt.Java8FileDescriptorSocket", socketClass)
            assertEquals(TlsVersion.TLS_1_2, response.handshake?.tlsVersion)
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

      }
    
      override fun reportedContentLength(response: Response): Long {
        return when {
          !response.promisesBody() -> 0L
          response.isChunked -> -1L
          else -> response.headersContentLength()
        }
      }
    
      override fun openResponseBodySource(response: Response): Source {
        return when {
          !response.promisesBody() -> newFixedLengthSource(0)
          response.isChunked -> newChunkedSource(response.request.url)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top