Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 785 for Headers (0.2 sec)

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

      }
    
      class Part private constructor(
        @get:JvmName("headers") val headers: Headers?,
        @get:JvmName("body") val body: RequestBody,
      ) {
        @JvmName("-deprecated_headers")
        @Deprecated(
          message = "moved to val",
          replaceWith = ReplaceWith(expression = "headers"),
          level = DeprecationLevel.ERROR,
        )
        fun headers(): Headers? = headers
    
        @JvmName("-deprecated_body")
        @Deprecated(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      @JvmName("-deprecated_getHeaders")
      @Deprecated(
        message = "moved to var",
        replaceWith = ReplaceWith(expression = "headers"),
        level = DeprecationLevel.ERROR,
      )
      fun getHeaders(): Headers = headers
    
      fun setHeaders(headers: Headers) = apply { this.headers = headers }
    
      @JvmName("-deprecated_getTrailers")
      @Deprecated(
        message = "moved to var",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/HeadersChallengesTest.kt

      @Test fun basicChallenge() {
        val headers =
          Headers.Builder()
            .add("WWW-Authenticate: Basic realm=\"protected area\"")
            .build()
        assertThat(headers.parseChallenges("WWW-Authenticate"))
          .isEqualTo(listOf(Challenge("Basic", mapOf("realm" to "protected area"))))
      }
    
      @Test fun basicChallengeWithCharset() {
        val headers =
          Headers.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  4. tests/test_security_http_basic_realm_description.py

    
    def test_security_http_basic_non_basic_credentials():
        payload = b64encode(b"johnsecret").decode("ascii")
        auth_header = f"Basic {payload}"
        response = client.get("/users/me", headers={"Authorization": auth_header})
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
        assert response.json() == {"detail": "Invalid authentication credentials"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  5. samples/compare/src/test/kotlin/okhttp3/compare/OkHttpClientTest.kt

            .url(server.url("/"))
            .header("Accept", "text/plain")
            .build()
        val response = client.newCall(request).execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.body.string()).isEqualTo("hello, OkHttp")
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/HeadersKotlinTest.kt

    import java.util.Date
    import okhttp3.Headers.Companion.headersOf
    import org.junit.jupiter.api.Test
    
    class HeadersKotlinTest {
      @Test fun getOperator() {
        val headers = headersOf("a", "b", "c", "d")
        assertThat(headers["a"]).isEqualTo("b")
        assertThat(headers["c"]).isEqualTo("d")
        assertThat(headers["e"]).isNull()
      }
    
      @Test fun iteratorOperator() {
        val headers = headersOf("a", "b", "c", "d")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Dec 21 01:54:49 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/header-params.md

    ## Duplicate headers
    
    It is possible to receive duplicate headers. That means, the same header with multiple values.
    
    You can define those cases using a list in the type declaration.
    
    You will receive all the values from the duplicate header as a Python `list`.
    
    For example, to declare a header of `X-Token` that can appear more than once, you can write:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  8. internal/crypto/header.go

    // functionality to handle SSE-C copy requests.
    var SSECopy = ssecCopy{}
    
    type ssecCopy struct{}
    
    // IsRequested returns true if the HTTP headers contains
    // at least one SSE-C copy header. Regular SSE-C headers
    // are ignored.
    func (ssecCopy) IsRequested(h http.Header) bool {
    	if _, ok := h[xhttp.AmzServerSideEncryptionCopyCustomerAlgorithm]; ok {
    		return true
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_advanced_middleware/test_tutorial003.py

    
    client = TestClient(app)
    
    
    def test_middleware():
        response = client.get("/large", headers={"accept-encoding": "gzip"})
        assert response.status_code == 200, response.text
        assert response.text == "x" * 4000
        assert response.headers["Content-Encoding"] == "gzip"
        assert int(response.headers["Content-Length"]) < 4000
        response = client.get("/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 665 bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Response.kt

          name: String,
          value: String,
        ) = commonAddHeader(name, value)
    
        /** Removes all headers named [name] on this builder. */
        open fun removeHeader(name: String) = commonRemoveHeader(name)
    
        /** Removes all headers on this builder and adds [headers]. */
        open fun headers(headers: Headers) = commonHeaders(headers)
    
        open fun body(body: ResponseBody) = commonBody(body)
    
    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)
Back to top