- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 578 for HEADERS (0.07 sec)
-
mockwebserver/src/test/java/mockwebserver3/RecordedRequestTest.kt
import java.net.InetAddress import java.net.Socket import okhttp3.Headers import okhttp3.Headers.Companion.headersOf import okhttp3.internal.EMPTY_HEADERS import okio.Buffer import org.junit.jupiter.api.Test import org.junit.jupiter.api.Timeout @Timeout(30) class RecordedRequestTest { private val headers: Headers = EMPTY_HEADERS @Test fun testIPv4() { val socket = FakeSocket(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
assertThat(connect.headers["Private"]).isNull() assertThat(connect.headers["User-Agent"]).isEqualTo(USER_AGENT) assertThat(connect.headers["Proxy-Connection"]).isEqualTo("Keep-Alive") assertThat(connect.headers["Host"]).isEqualTo("android.com:443") val get = server.takeRequest() assertThat(get.headers["Private"]).isEqualTo("Secret") assertThat(get.headers["User-Agent"]).isEqualTo("App 1.0")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
): Builder = chunkedBody(Buffer().writeUtf8(body), maxChunkSize) /** Sets the headers and returns this. */ fun headers(headers: Headers) = apply { this.headers = headers.newBuilder() } /** Sets the trailers and returns this. */ fun trailers(trailers: Headers) = apply { this.trailers = trailers.newBuilder() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 13.3K 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/test/java/okhttp3/HeadersJvmTest.kt
val expected = Instant.ofEpochMilli(0L) val headers = Headers.Builder() .add("Test-Instant", expected) .build() assertThat(headers["Test-Instant"]).isEqualTo("Thu, 01 Jan 1970 00:00:00 GMT") assertThat(headers.getInstant("Test-Instant")).isEqualTo(expected) } @Test fun setDate() { val expected = Date(1000) val headers = Headers.Builder() .add("testDate", Date(0L))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K 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/test/java/okhttp3/HeadersTest.kt
assertThat(headers.name(1)).isEqualTo("c") assertFailsWith<IndexOutOfBoundsException> { headers.name(2) } } @Test fun valueIndexesAreStrict() { val headers = headersOf("a", "b", "c", "d") assertFailsWith<IndexOutOfBoundsException> { headers.value(-1) } assertThat(headers.value(0)).isEqualTo("b") assertThat(headers.value(1)).isEqualTo("d")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.6K 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)