- Sort Score
- Num 10 results
- Language All
Results 61 - 70 of 846 for haddrs (0.06 seconds)
-
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
def test_gzip_request(client: TestClient, compress): n = 1000 headers = {} body = [1] * n data = json.dumps(body).encode() if compress: data = gzip.compress(data) headers["Content-Encoding"] = "gzip" headers["Content-Type"] = "application/json" response = client.post("/sum", content=data, headers=headers) assert response.json() == {"sum": n}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.3K bytes - Click Count (0) -
tests/test_default_response_class.py
assert response.headers["content-type"] == orjson_type def test_router_a_a_override(): with client: response = client.get("/a/a/override") assert response.content == b"Hello A A" assert response.headers["content-type"] == text_type def test_router_a_b(): with client: response = client.get("/a/b") assert response.content == b"Hello A B"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Mar 01 20:49:20 GMT 2020 - 5.2K bytes - Click Count (0) -
docs_src/response_headers/tutorial001_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 309 bytes - Click Count (0) -
src/test/java/org/codelibs/curl/CurlResponseTest.java
Map<String, List<String>> headers = new HashMap<>(); headers.put("Content-Type", Arrays.asList("application/json")); headers.put("Content-Length", Arrays.asList("100")); response.setHeaders(headers); Map<String, List<String>> result = response.getHeaders(); assertNotNull(result); // Headers should be stored in lowercase
Created: Sat Dec 20 09:13:53 GMT 2025 - Last Modified: Thu Nov 20 13:34:13 GMT 2025 - 12.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/header-param-models.md
**FastAPI** 将从请求中接收到的 **headers** 中**提取**出**每个字段**的数据,并提供您定义的 Pydantic 模型。 ## 查看文档 您可以在文档 UI 的 `/docs` 中查看所需的 headers: <div class="screenshot"> <img src="/img/tutorial/header-param-models/image01.png"> </div> ## 禁止额外的 Headers 在某些特殊使用情况下(可能并不常见),您可能希望**限制**您想要接收的 headers。 您可以使用 Pydantic 的模型配置来禁止( `forbid` )任何额外( `extra` )字段:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Dec 15 16:44:11 GMT 2024 - 1.7K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/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")Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 2K bytes - Click Count (0) -
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",
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.7K bytes - Click Count (0) -
okhttp/api/android/okhttp.api
public final fun addUnsafeNonAscii (Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder; public final fun build ()Lokhttp3/Headers; public final fun get (Ljava/lang/String;)Ljava/lang/String; public final fun removeAll (Ljava/lang/String;)Lokhttp3/Headers$Builder; public final fun set (Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 70.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
) = apply { headers.add(name, value) } /** Removes all headers named [name] on this builder. */ open fun removeHeader(name: String) = apply { headers.removeAll(name) } /** Removes all headers on this builder and adds [headers]. */ open fun headers(headers: Headers) = apply { this.headers = headers.newBuilder() }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Mon Jul 28 14:39:28 GMT 2025 - 18.1K bytes - Click Count (0) -
tests/test_request_params/test_header/test_optional_list.py
@pytest.mark.parametrize( "path", ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str(path: str): client = TestClient(app) response = client.get(path, headers=[("p", "hello"), ("p", "world")]) assert response.status_code == 200 assert response.json() == {"p": ["hello", "world"]} # =====================================================================================
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9.3K bytes - Click Count (0)