- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,223 for headers (0.07 sec)
-
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) -
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`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.6K bytes - Viewed (0) -
docs/en/docs/tutorial/header-param-models.md
``` //// **FastAPI** will **extract** the data for **each field** from the **headers** in the request and give you the Pydantic model you defined. ## Check the Docs You can see the required headers in the docs UI at `/docs`: <div class="screenshot"> <img src="/img/tutorial/header-param-models/image01.png"> </div> ## Forbid Extra Headers
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestCommonTest.kt
val headers = headersOf("User-Agent", "RequestTest") val request = Request( url = url, headers = headers, ) assertThat(request.url).isEqualTo(url) assertThat(request.headers).isEqualTo(headers) assertThat(request.method).isEqualTo("GET") assertThat(request.body).isNull() assertThat(request.tags).isEmpty() } @Test fun constructorNoMethod() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
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/HeadersRequestTest.kt
assertThat(headers.value(0)).isEqualTo("HTTP/1.1") } @Test fun http2HeadersListDropsForbiddenHeadersHttp2() { val request = Request.Builder() .url("http://square.com/") .header("Connection", "upgrade") .header("Upgrade", "websocket") .header("Host", "square.com") .header("TE", "gzip") .build() val expected = headerEntries(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.5K bytes - Viewed (0) -
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jul 06 09:38:30 UTC 2024 - 15.6K bytes - Viewed (0) -
okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallTest.kt
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") assertThat(hostnameVerifier.calls).containsExactly("verify android.com") } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 142.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/HeadersJvmTest.kt
Headers.Builder() .addUnsafeNonAscii("héader1", "value1") .build() }.also { expected -> assertThat(expected.message).isEqualTo("Unexpected char 0xe9 at 1 in header name: héader1") } } @Test fun addUnsafeNonAsciiAcceptsUnicodeValue() { val headers = Headers.Builder() .addUnsafeNonAscii("header1", "valué1") .build()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K bytes - Viewed (0)