Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 231 for headless (0.03 sec)

  1. src/test/java/org/codelibs/curl/CurlResponseTest.java

            Map<String, List<String>> headers = new HashMap<>();
            headers.put("Content-Type", Arrays.asList("application/json"));
            headers.put("Content-Length", Arrays.asList("100"));
    
            response.setHeaders(headers);
    
            Map<String, List<String>> result = response.getHeaders();
            assertNotNull(result);
            // Headers should be stored in lowercase
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Thu Jul 31 01:01:12 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/SocketFailureTest.kt

          )
        call1.execute().use { response -> response.body.string() }
    
        listener.shouldClose = true
        // Large headers are a likely reason the servers would cut off the connection before it completes sending
        // request headers.
        // 431 "Request Header Fields Too Large"
        val largeHeaders =
          Headers
            .Builder()
            .apply {
              repeat(32) {
                add("name-$it", "value-$it-" + "0".repeat(1024))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 21:11:09 UTC 2025
    - 3K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/KotlinDeprecationErrorTest.kt

        val localPrincipal: Principal? = handshake.localPrincipal()
      }
    
      @Test @Disabled
      fun headers() {
        var headers: Headers = Headers.of("", "")
        headers = Headers.of(mapOf("" to ""))
        val size: Int = headers.size()
      }
    
      @Test @Disabled
      fun httpLoggingInterceptor() {
        val interceptor = HttpLoggingInterceptor()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/TrailersSource.kt

     */
    interface TrailersSource {
      @Throws(IOException::class)
      fun peek(): Headers? = null
    
      @Throws(IOException::class)
      fun get(): Headers
    
      companion object {
        @JvmField
        val EMPTY: TrailersSource =
          object : TrailersSource {
            override fun peek() = Headers.EMPTY
    
            override fun get() = Headers.EMPTY
          }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 18:57:05 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/RecordedResponse.kt

        }
    
      fun assertHeader(
        name: String,
        vararg values: String?,
      ) = apply {
        assertThat(response!!.headers(name)).containsExactly(*values)
      }
    
      fun assertHeaders(headers: Headers) =
        apply {
          assertThat(response!!.headers).isEqualTo(headers)
        }
    
      fun assertBody(expectedBody: String) =
        apply {
          assertThat(body).isEqualTo(expectedBody)
        }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

      }
    
      @Test
      fun headers() {
        var headers: Headers = headersOf("", "")
        headers = mapOf("" to "").toHeaders()
        val get: String? = headers[""]
        val date: Date? = headers.getDate("")
        val instant: Instant? = headers.getInstant("")
        val size: Int = headers.size
        val name: String = headers.name(0)
        val value: String = headers.value(0)
        val names: Set<String> = headers.names()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  7. docs/changelogs/changelog_2x.md

        API. Requests made with OkUrlFactory will continue to have a default user
        agent.
     *  New: Guava-like API to create headers:
    
        ```java
        Headers headers = Headers.of(name1, value1, name2, value2, ...).
        ```
    
     *  New: Make the content-type header optional for request bodies.
     *  New: `Response.isSuccessful()` is a convenient API to check response codes.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

      fun writeRequest(
        headers: Headers,
        requestLine: String,
      ) {
        check(state == STATE_IDLE) { "state: $state" }
        socket.sink.writeUtf8(requestLine).writeUtf8("\r\n")
        for (i in 0 until headers.size) {
          socket.sink
            .writeUtf8(headers.name(i))
            .writeUtf8(": ")
            .writeUtf8(headers.value(i))
            .writeUtf8("\r\n")
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 17.5K bytes
    - Viewed (0)
  9. docs/recipes.md

    each other, corrupt the response cache, and possibly crash your program.
    
    Response caching uses HTTP headers for all configuration. You can add request headers like `Cache-Control: max-stale=3600` and OkHttp's cache will honor them. Your webserver configures how long responses are cached with its own response headers, like `Cache-Control: max-age=9600`. There are cache headers to force a cached response, force a network response, or force the network response to be validated with a conditional...
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/CurrentDateHeader.java

        @Override public Response intercept(Chain chain) throws IOException {
          Request request = chain.request();
          Headers newHeaders = request.headers()
              .newBuilder()
              .add("Date", new Date())
              .build();
          Request newRequest = request.newBuilder()
              .headers(newHeaders)
              .build();
          return chain.proceed(newRequest);
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Oct 31 15:32:50 UTC 2018
    - 1.8K bytes
    - Viewed (0)
Back to top