Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for Content (0.2 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-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)
  3. 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)
  4. okhttp/src/test/java/okhttp3/CallTest.kt

          .assertHeader("Content-Encoding")
          .assertHeader("Content-Length")
          .assertBody("abcabcabc")
    
        // But the network request doesn't lie. OkHttp used gzip for this call.
        userResponse.networkResponse()
          .assertHeader("Content-Encoding", "gzip")
          .assertHeader("Content-Length", bodySize)
          .assertRequestHeader("Accept-Encoding", "gzip")
      }
    
    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)
  5. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

     */
    @RunWith(AndroidJUnit4::class)
    @SdkSuppress(minSdkVersion = 34)
    class AndroidHttpEngineTest {
      val context = InstrumentationRegistry.getInstrumentation().context
    
      val cacheDir =
        context.cacheDir.resolve("httpEngine").also {
          it.mkdirs()
        }
      val engine =
        HttpEngine.Builder(context)
          .setEnableBrotli(true)
          .setStoragePath(cacheDir.path)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
         * Content-Length: 100
         * Cache-Control: max-age=600
         * ```
         *
         * A typical HTTPS file looks like this:
         *
         * ```
         * https://google.com/foo
         * GET
         * 2
         * Accept-Language: fr-CA
         * Accept-Charset: UTF-8
         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
         * Content-Length: 100
    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)
  7. okhttp-android/src/test/kotlin/okhttp3/android/RobolectricOkHttpClientTest.kt

    import org.robolectric.annotation.Config
    
    @RunWith(RobolectricTestRunner::class)
    @Config(
      sdk = [30],
    )
    class RobolectricOkHttpClientTest {
      private lateinit var context: Context
      private lateinit var client: OkHttpClient
    
      @Before
      fun setUp() {
        context = ApplicationProvider.getApplicationContext<Application>()
        client =
          OkHttpClient.Builder()
            .cache(Cache(FakeFileSystem(), "/cache".toPath(), 10_000_000))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        }
    
        /**
         * Returns true if [fieldName] is content specific and therefore should always be used
         * from cached headers.
         */
        private fun isContentSpecificHeader(fieldName: String): Boolean {
          return "Content-Length".equals(fieldName, ignoreCase = true) ||
            "Content-Encoding".equals(fieldName, ignoreCase = true) ||
            "Content-Type".equals(fieldName, ignoreCase = true)
        }
      }
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

      }
    
      private fun dnsResponse(s: String): MockResponse {
        return MockResponse.Builder()
          .body(Buffer().write(s.decodeHex()))
          .addHeader("content-type", "application/dns-message")
          .addHeader("content-length", s.length / 2)
          .build()
      }
    
      private fun buildLocalhost(
        bootstrapClient: OkHttpClient,
        includeIPv6: Boolean,
        post: Boolean = false,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

       * be non-null.
       *
       * If the exchange was canceled or timed out, this will wrap [e] in an exception that provides
       * that additional context. Otherwise [e] is returned as-is.
       */
      internal fun <E : IOException?> messageDone(
        exchange: Exchange,
        requestDone: Boolean,
        responseDone: Boolean,
        e: E,
      ): E {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
Back to top