Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for Content (0.25 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

           *
           * Example:
           * ```
           * --> POST /greeting http/1.1
           * Host: example.com
           * Content-Type: plain/text
           * Content-Length: 3
           * --> END POST
           *
           * <-- 200 OK (22ms)
           * Content-Type: plain/text
           * Content-Length: 6
           * <-- END HTTP
           * ```
           */
          HEADERS,
    
          /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

              return Buffer().writeUtf8("hello")
            }
          }
        assertFailsWith<IOException> {
          body.bytes()
        }.also { expected ->
          assertThat(expected.message).isEqualTo(
            "Content-Length (10) and stream length (5) disagree",
          )
        }
      }
    
      @Test
      fun bytesThrowsMoreThanIntMaxValue() {
        val body: ResponseBody =
          object : ResponseBody() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

          Header("authorization", ""),
          Header("cache-control", ""),
          Header("content-disposition", ""),
          Header("content-encoding", ""),
          Header("content-language", ""),
          Header("content-length", ""),
          Header("content-location", ""),
          Header("content-range", ""),
          Header("content-type", ""),
          Header("cookie", ""),
          Header("date", ""),
          Header("etag", ""),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (1)
  4. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

          assertThat(headersToList(builder)).containsExactly("Content-Length: 0")
        }
      }
    
      @Test
      fun setStatusControlsWholeStatusLine() {
        val builder = MockResponse.Builder().status("HTTP/1.1 202 That'll do pig")
        assertThat(headersToList(builder)).containsExactly("Content-Length: 0")
        assertThat(builder.status).isEqualTo("HTTP/1.1 202 That'll do pig")
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  5. docs/recipes.md

    === ":material-language-kotlin: Kotlin"
        ```kotlin
          private val client = OkHttpClient()
    
          fun run() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  6. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        response.body.close()
        applicationLogs
          .assertLogEqual("--> POST $url")
          .assertLogEqual("Content-Type: text/plain; charset=utf-8")
          .assertLogEqual("Content-Length: 3")
          .assertLogEqual("--> END POST")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms\)"""))
          .assertLogEqual("Content-Length: 0")
          .assertLogEqual("<-- END HTTP")
          .assertNoMoreLogs()
        networkLogs
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  7. docs/changelogs/changelog_4x.md

     *  Fix: Un-deprecate `MockResponse.setHeaders()` and other setters. These were deprecated in OkHttp
        4.0 but that broke method chaining for Java callers.
    
     *  Fix: Don't crash on HTTP/2 HEAD requests when the `Content-Length` header is present but is not
        consistent with the length of the response body.
    
     *  Fix: Don't crash when converting a `HttpUrl` instance with an unresolvable hostname to a URI.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/RequestCommonTest.kt

        assertThat(requestC.tag(String::class)).isSameAs("c")
      }
    
      @Test
      fun requestToStringRedactsSensitiveHeaders() {
        val headers =
          Headers.Builder()
            .add("content-length", "99")
            .add("authorization", "peanutbutter")
            .add("proxy-authorization", "chocolate")
            .add("cookie", "drink=coffee")
            .add("set-cookie", "accessory=sugar")
    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. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

    class MultipartReaderTest {
      @Test fun `parse multipart`() {
        val multipart =
          """
          |--simple boundary
          |Content-Type: text/plain; charset=utf-8
          |Content-ID: abc
          |
          |abcd
          |efgh
          |--simple boundary
          |Content-Type: text/plain; charset=utf-8
          |Content-ID: ijk
          |
          |ijkl
          |mnop
          |
          |--simple boundary--
          """.trimMargin()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        val expected =
          """
          |--AaB03x
          |Content-Disposition: form-data; name="submit-name"
          |
          |Larry
          |--AaB03x
          |Content-Disposition: form-data; name="files"
          |Content-Type: multipart/mixed; boundary=BbC04y
          |
          |--BbC04y
          |Content-Disposition: file; filename="file1.txt"
          |Content-Type: text/plain; charset=utf-8
          |
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
Back to top