Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 159 for BODY (0.15 sec)

  1. okhttp/src/main/kotlin/okhttp3/Request.kt

        open fun head(): Builder = commonHead()
    
        open fun post(body: RequestBody): Builder = commonPost(body)
    
        @JvmOverloads
        open fun delete(body: RequestBody? = commonEmptyRequestBody): Builder = commonDelete(body)
    
        open fun put(body: RequestBody): Builder = commonPut(body)
    
        open fun patch(body: RequestBody): Builder = commonPatch(body)
    
        open fun method(
          method: String,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

        assertThat(response.body.string()).isEqualTo("abc")
      }
    
      @Test
      fun clientAuthForNeeds() {
        val client = buildClient(clientCert, clientIntermediateCa.certificate)
        val socketFactory = buildServerSslSocketFactory()
        server.useHttps(socketFactory)
        server.requireClientAuth()
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

            localhostIpv4,
            localhostIpv6,
          )
        serverIpv4.enqueue(
          MockResponse(body = "unexpected call to IPv4"),
        )
        serverIpv6.enqueue(
          MockResponse(body = "hello from IPv6"),
        )
    
        val call = client.newCall(Request(url))
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("hello from IPv6")
    
        // In the process we made one successful connection attempt.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

              if (requestBody.isDuplex()) {
                // Prepare a duplex body so that the application can send a request body later.
                exchange.flushRequest()
                val bufferedRequestBody = exchange.createRequestBody(request, true).buffer()
                requestBody.writeTo(bufferedRequestBody)
              } else {
                // Write the request body if the "Expect: 100-continue" expectation was met.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  5. mockwebserver/src/main/kotlin/mockwebserver3/RecordedRequest.kt

      val headers: Headers,
      /**
       * The sizes of the chunks of this request's body, or an empty list if the request's body
       * was empty or unchunked.
       */
      val chunkSizes: List<Int>,
      /** The total size of the body of this POST request (before truncation).*/
      val bodySize: Long,
      /** The body of this POST request. This may be truncated. */
      val body: Buffer,
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3.8K bytes
    - Viewed (1)
  6. okhttp/src/test/java/okhttp3/InterceptorTest.kt

          MockResponse.Builder()
            .body("abc")
            .throttleBody(1, 1, TimeUnit.SECONDS)
            .build(),
        )
        val request1 =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val call = client.newCall(request1)
        val response = call.execute()
        val body = response.body
        assertFailsWith<SocketTimeoutException> {
          body.string()
        }
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/SocksProxyTest.kt

      fun proxy() {
        server.enqueue(MockResponse.Builder().body("abc").build())
        server.enqueue(MockResponse.Builder().body("def").build())
        val client =
          clientTestRule.newClientBuilder()
            .proxy(socksProxy.proxy())
            .build()
        val request1 = Request.Builder().url(server.url("/")).build()
        val response1 = client.newCall(request1).execute()
        assertThat(response1.body.string()).isEqualTo("abc")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  8. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        enableTls()
    
        client = client.newBuilder().eventListenerFactory(clientTestRule.wrap(eventListener)).build()
    
        server.enqueue(MockResponse(body = "abc1"))
        server.enqueue(MockResponse(body = "abc2"))
    
        val request = Request.Builder().url(server.url("/")).build()
    
        client.newCall(request).execute().use { response ->
          assertEquals(200, response.code)
        }
    
    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)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

        val uppercaseBody: ResponseBody =
          object : ForwardingResponseBody(response.body) {
            override fun source(): BufferedSource {
              return uppercaseSource(delegate().source()).buffer()
            }
          }
        return response.newBuilder()
          .body(uppercaseBody)
          .build()
      }
    
      private fun uppercaseSource(source: BufferedSource): ForwardingSource {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

          MockResponse.Builder()
            .body(BIG_ENOUGH_BODY)
            .build(),
        )
        val request =
          Request.Builder()
            .url(server.url("/"))
            .build()
        val call = client.newCall(request)
        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        val response = call.execute()
        Thread.sleep(500)
        assertFailsWith<IOException> {
          response.body.source().readUtf8()
        }.also { expected ->
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top