Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 718 for Headers (0.03 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/AccessHeaders.java

          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println("Server: " + response.header("Server"));
          System.out.println("Date: " + response.header("Date"));
          System.out.println("Vary: " + response.headers("Vary"));
        }
      }
    
      public static void main(String... args) throws Exception {
        new AccessHeaders().run();
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun May 22 01:29:42 UTC 2016
    - 1.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/BaseTestHandler.kt

      override fun data(
        inFinished: Boolean,
        streamId: Int,
        source: BufferedSource,
        length: Int,
      ) {
        fail("")
      }
    
      override fun headers(
        inFinished: Boolean,
        streamId: Int,
        associatedStreamId: Int,
        headerBlock: List<Header>,
      ) {
        fail("")
      }
    
      override fun rstStream(
        streamId: Int,
        errorCode: ErrorCode,
      ) {
        fail("")
      }
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/CompressionInterceptor.kt

      override fun intercept(chain: Interceptor.Chain): Response =
        if (algorithms.isNotEmpty() && chain.request().header("Accept-Encoding") == null) {
          val request =
            chain
              .request()
              .newBuilder()
              .header("Accept-Encoding", acceptEncoding)
              .build()
    
          val response = chain.proceed(request)
    
          decompress(response)
        } else {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 15:15:28 UTC 2025
    - 2.9K bytes
    - Viewed (1)
  4. README.md

    =====
    
    A simple cURL-like Java HTTP client.
    
    ## Features
    
    - Fluent API for building HTTP requests (GET, POST, PUT, DELETE, HEAD, OPTIONS, CONNECT, TRACE)
    - Support for query parameters, headers, body (String or stream), compression, SSL configuration, proxies, and timeouts
    - Automatic in-memory or on-disk caching of request/response bodies
    - Synchronous and asynchronous (callback) execution
    Registered: Sat Dec 20 09:13:53 UTC 2025
    - Last Modified: Thu Nov 20 13:34:13 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  5. maven-tests/src/test/java/com/squareup/okhttp3/maventest/AppTest.java

    import mockwebserver3.MockWebServer;
    import okhttp3.Headers;
    import org.junit.Test;
    
    import java.io.IOException;
    
    /**
     * Unit test for simple App.
     */
    public class AppTest {
      private final MockWebServer mockWebServer = new MockWebServer();
    
      @Test
      public void testApp() throws IOException {
        mockWebServer.enqueue(new MockResponse(200, Headers.of(), "Hello, Maven!"));
        mockWebServer.start();
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Jul 12 12:05:57 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerHeader.kt

      /** Identifies which member in the ASN.1 schema the field holds. */
      var tag: Long,
      /**
       * If the constructed bit is set it indicates that the value is composed of other values that have
       * their own headers.
       *
       * This value is encoded in bit 6 of the first byte of each value.
       *
       * ```
       * 0bxx0xxxxx Primitive
       * 0bxx1xxxxx Constructed
       * ```
       */
      var constructed: Boolean,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Cookie.kt

        }
    
        /** Returns all of the cookies from a set of HTTP response headers. */
        @JvmStatic
        fun parseAll(
          url: HttpUrl,
          headers: Headers,
        ): List<Cookie> {
          val cookieStrings = headers.values("Set-Cookie")
          var cookies: MutableList<Cookie>? = null
    
          for (i in 0 until cookieStrings.size) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 23.1K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        }
      }
    
      private fun headersToList(response: MockResponse): List<String> {
        val headers = response.headers
        val size = headers.size
        val headerList: MutableList<String> = ArrayList(size)
        for (i in 0 until size) {
          headerList.add(headers.name(i) + ": " + headers.value(i))
        }
        return headerList
      }
    
      @Test
      fun shutdownWithoutStart() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt

    import java.util.Arrays
    import java.util.concurrent.TimeUnit
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.junit5.StartStop
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.internal.DoubleInetAddressDns
    import okhttp3.internal.connection.RealConnectionPool.Companion.get
    import okhttp3.testing.Flaky
    import okhttp3.testing.PlatformRule
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 18:33:48 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Callback.kt

       * response body is [closed][ResponseBody]. The recipient of the callback may consume the response
       * body on another thread.
       *
       * Note that transport-layer success (receiving a HTTP response code, headers and body) does not
       * necessarily indicate application-layer success: `response` may still indicate an unhappy HTTP
       * response code like 404 or 500.
       */
      @Throws(IOException::class)
      fun onResponse(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 1.6K bytes
    - Viewed (0)
Back to top