- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 578 for headersOf (0.06 sec)
-
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/PushPromise.kt
* limitations under the License. */ package okhttp3.mockwebserver import okhttp3.Headers class PushPromise( @get:JvmName("method") val method: String, @get:JvmName("path") val path: String, @get:JvmName("headers") val headers: Headers, @get:JvmName("response") val response: MockResponse, ) { @JvmName("-deprecated_method") @Deprecated( message = "moved to val",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Could not validate credentials"} assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"' def test_incorrect_token_type(): response = client.get( "/users/me", headers={"Authorization": "Notexistent testtoken"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
name: String, value: String, ) = apply { headers[name] = value } fun Response.Builder.commonAddHeader( name: String, value: String, ) = apply { headers.add(name, value) } fun Response.Builder.commonRemoveHeader(name: String) = apply { headers.removeAll(name) } fun Response.Builder.commonHeaders(headers: Headers) = apply { this.headers = headers.newBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_cors/test_tutorial001.py
) assert response.headers["access-control-allow-headers"] == "X-Example" # Test standard response headers = {"Origin": "https://localhost.tiangolo.com"} response = client.get("/", headers=headers) assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"} assert ( response.headers["access-control-allow-origin"]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 1.2K bytes - Viewed (0) -
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()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.6K bytes - Viewed (0) -
docs_src/app_testing/app_b_py310/test_main.py
def test_read_item(): response = client.get("/items/foo", headers={"X-Token": "coneofsilence"}) assert response.status_code == 200 assert response.json() == { "id": "foo", "title": "Foo", "description": "There goes my hero", } def test_read_item_bad_token(): response = client.get("/items/foo", headers={"X-Token": "hailhydra"}) assert response.status_code == 400
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2.kt
const val FLAG_ACK = 0x1 // Used for settings and ping. const val FLAG_END_STREAM = 0x1 // Used for headers and data. const val FLAG_END_HEADERS = 0x4 // Used for headers and continuation. const val FLAG_END_PUSH_PROMISE = 0x4 const val FLAG_PADDED = 0x8 // Used for headers and data. const val FLAG_PRIORITY = 0x20 // Used for headers. const val FLAG_COMPRESSED = 0x20 // Used for data. /** Lookup table for valid frame types. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
}.toString() } private fun logHeader( headers: Headers, i: Int, ) { val value = if (headers.name(i) in headersToRedact) "██" else headers.value(i) logger.log(headers.name(i) + ": " + value) } private fun bodyHasUnknownEncoding(headers: Headers): Boolean { val contentEncoding = headers["Content-Encoding"] ?: return false
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 11.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
} /** Accept headers from the network and store them until the client calls [takeHeaders]. */ fun receiveHeaders( headers: Headers, inFinished: Boolean, ) { lock.assertNotHeld() val open: Boolean this.withLock { if (!hasResponseHeaders || headers[Header.RESPONSE_STATUS_UTF8] != null || headers[Header.TARGET_METHOD_UTF8] != null ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 23.2K bytes - Viewed (0) -
samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt
assertThat(recorded.headers["Accept"]).isEqualTo("text/plain") assertThat(recorded.headers["Accept-Encoding"]).isNull() // No built-in gzip. assertThat(recorded.headers["Connection"]).isEqualTo("Upgrade, HTTP2-Settings") if (PlatformVersion.majorVersion < 19) { assertThat(recorded.headers["Content-Length"]).isEqualTo("0") } assertThat(recorded.headers["HTTP2-Settings"]).isNotNull()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0)