- Sort Score
- Num 10 results
- Language All
Results 101 - 110 of 1,379 for header2 (0.05 seconds)
-
docs_src/app_testing/app_b_an_py39/test_main.py
def test_read_nonexistent_item(): response = client.get("/items/baz", headers={"X-Token": "coneofsilence"}) assert response.status_code == 404 assert response.json() == {"detail": "Item not found"} def test_create_item(): response = client.post( "/items/", headers={"X-Token": "coneofsilence"},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Aug 15 22:31:16 GMT 2024 - 1.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/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") } /**
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 147.4K bytes - Click Count (0) -
docs_src/header_param_models/tutorial001_an_py310.py
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: str | None = None traceparent: str | None = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: Annotated[CommonHeaders, Header()]):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 392 bytes - Click Count (0) -
tests/test_tutorial/test_header_param_models/test_tutorial001.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 7.3K bytes - Click Count (0) -
docs_src/header_param_models/tutorial001_py39.py
from fastapi import FastAPI, Header from pydantic import BaseModel app = FastAPI() class CommonHeaders(BaseModel): host: str save_data: bool if_modified_since: Union[str, None] = None traceparent: Union[str, None] = None x_tag: list[str] = [] @app.get("/items/") async def read_items(headers: CommonHeaders = Header()):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 390 bytes - Click Count (0) -
docs/recipes.md
When writing request headers, use `header(name, value)` to set the only occurrence of `name` to `value`. If there are existing values, they will be removed before the new value is added. Use `addHeader(name, value)` to add a header without removing the headers already present.
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Aug 30 17:01:12 GMT 2025 - 47.8K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt
value: String, ) = 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_query_cookie_header_model_extra_params.py
from fastapi import Cookie, FastAPI, Header, Query from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Model(BaseModel): param: str model_config = {"extra": "allow"} @app.get("/query") async def query_model_with_extra(data: Model = Query()): return data @app.get("/header") async def header_model_with_extra(data: Model = Header()): return data
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 2.3K bytes - Click Count (0) -
internal/s3select/simdj/reader.go
} // NewElementReader - creates new JSON reader using readCloser. func NewElementReader(ch chan simdjson.Object, err *error, args *json.ReaderArgs) *Reader { return &Reader{ args: args, decoded: ch, err: err, readCloser: nil, } } // safeCloser will wrap a Reader as a ReadCloser. // It is safe to call Close while the reader is being used. type safeCloser struct { closed uint32
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Tue May 30 17:02:22 GMT 2023 - 4.9K bytes - Click Count (0) -
internal/etag/reader.go
// // // Now, we need an io.Reader that can access // // the ETag computed over the content. // reader := etag.Wrap(encryptedContent, content) func Wrap(wrapped, content io.Reader) io.Reader { if t, ok := content.(Tagger); ok { return wrapReader{ Reader: wrapped, Tagger: t, } } return wrapReader{ Reader: wrapped, } } // A Reader wraps an io.Reader and computes the
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Sun Mar 30 00:56:02 GMT 2025 - 4.8K bytes - Click Count (0)