Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for helper (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/Request.kt

        open fun url(url: URL) = url(url.toString().toHttpUrl())
    
        /**
         * Sets the header named [name] to [value]. If this request already has any headers
         * with that name, they are all replaced.
         */
        open fun header(
          name: String,
          value: String,
        ) = commonHeader(name, value)
    
        /**
         * Adds a header with [name] and [value]. Prefer this method for multiply-valued
         * headers like "Cookie".
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        connection.readerRunnable.applyAndAckSettings(true, settings)
        assertThat(connection.peerSettings[Settings.MAX_CONCURRENT_STREAMS]).isEqualTo(amount)
        taskFaker.runTasks()
      }
    
      /** Use a helper method so there's no hidden reference remaining on the stack.  */
      private fun allocateAndLeakAllocation(
        pool: ConnectionPool,
        connection: RealConnection,
      ) {
        val client =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Headers.kt

              }
              line[0] == ':' -> {
                // Work around empty header names and header names that start with a colon (created by old
                // broken SPDY versions of the response cache).
                addLenient("", line.substring(1)) // Empty header name.
              }
              else -> {
                // No header name.
                addLenient("", line)
              }
            }
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  4. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

            headers = Headers.Builder()
          }
    
        /**
         * Adds [header] as an HTTP header. For well-formed HTTP [header] should contain a name followed
         * by a colon and a value.
         */
        fun addHeader(header: String) =
          apply {
            headers.add(header)
          }
    
        /**
         * Adds a new header with the name and value. This may be used to add multiple headers with the
         * same name.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/Response.kt

            this.handshake = handshake
          }
    
        /**
         * Sets the header named [name] to [value]. If this request already has any headers
         * with that name, they are all replaced.
         */
        open fun header(
          name: String,
          value: String,
        ) = commonHeader(name, value)
    
        /**
         * Adds a header with [name] to [value]. Prefer this method for multiply-valued
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

      private var state = STATE_IDLE
      private val headersReader = HeadersReader(source)
    
      private val Response.isChunked: Boolean
        get() = "chunked".equals(header("Transfer-Encoding"), ignoreCase = true)
    
      private val Request.isChunked: Boolean
        get() = "chunked".equals(header("Transfer-Encoding"), ignoreCase = true)
    
      /**
       * Received trailers. Null unless the response body uses chunked transfer-encoding and includes
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/CookiesTest.kt

            .build()
        get(redirectSourceUrl)
        val request = redirectSource.takeRequest()
        assertThat(request.headers["Cookie"]).isEqualTo("c=cookie")
        for (header in redirectTarget.takeRequest().headers.names()) {
          if (header.startsWith("Cookie")) {
            fail(header)
          }
        }
      }
    
      @Test
      fun testCookiesSentIgnoresCase() {
        client =
          client.newBuilder()
            .cookieJar(
    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)
  8. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * ```
         *
         * The file is newline separated. The first two lines are the URL and the request method. Next
         * is the number of HTTP Vary request header lines, followed by those lines.
         *
         * Next is the response status line, followed by the number of HTTP response header lines,
         * followed by those lines.
         *
         * HTTPS responses also contain SSL session information. This begins with a blank line, and then
    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)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              nextRequest = route.address.proxyAuthenticator.authenticate(route, response)
                ?: throw IOException("Failed to authenticate with proxy")
    
              if ("close".equals(response.header("Connection"), ignoreCase = true)) {
                return nextRequest
              }
            }
    
            else -> throw IOException("Unexpected response code for CONNECT: ${response.code}")
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  10. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        extraNetworkInterceptor =
          Interceptor { chain: Interceptor.Chain ->
            chain.proceed(
              chain.request()
                .newBuilder()
                .header("Content-Length", "2")
                .header("Content-Type", "text/plain-ish")
                .build(),
            )
          }
        server.enqueue(MockResponse())
        client.newCall(
          request()
            .post("Hi?".toRequestBody(PLAIN))
    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)
Back to top