Search Options

Results per page
Sort
Preferred Languages
Advance

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

    import okio.buffer
    import okio.gzip
    
    /**
     * Downloads the public suffix list from https://publicsuffix.org/list/public_suffix_list.dat and
     * transforms the file into an efficient format used by OkHttp.
     *
     *
     * The intent is to use this class to update the list periodically by manually running the main
     * method. This should be run from the top-level okhttp directory.
     *
     *
     * The resulting file is used by [PublicSuffixDatabase].
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertThat(cache.hitCount()).isEqualTo(0)
      }
    
      private fun corruptCertificate(cacheEntry: Path) {
        var content = fileSystem.source(cacheEntry).buffer().readUtf8()
        content = content.replace("MII", "!!!")
        fileSystem.sink(cacheEntry).buffer().writeUtf8(content).close()
      }
    
      @Test
      fun responseCachingAndRedirects() {
        server.enqueue(
          MockResponse.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt

        ): Boolean {
          // Always go to network for uncacheable response codes (RFC 7231 section 6.1), This
          // implementation doesn't support caching partial content.
          when (response.code) {
            HTTP_OK,
            HTTP_NOT_AUTHORITATIVE,
            HTTP_NO_CONTENT,
            HTTP_MULT_CHOICE,
            HTTP_MOVED_PERM,
            HTTP_NOT_FOUND,
            HTTP_BAD_METHOD,
            HTTP_GONE,
            HTTP_REQ_TOO_LONG,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

          return reuseSocket
        }
      }
    
      @Throws(Exception::class)
      private fun processHandshakeFailure(raw: Socket) {
        val context = SSLContext.getInstance("TLS")
        context.init(null, arrayOf<TrustManager>(UNTRUSTED_TRUST_MANAGER), SecureRandom())
        val sslSocketFactory = context.socketFactory
        val socket =
          sslSocketFactory.createSocket(
            raw,
            raw.inetAddress.hostAddress,
            raw.port,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top