- Sort Score
- Result 10 results
- Languages All
Results 331 - 340 of 1,224 for header2 (0.25 sec)
-
docs_src/header_params/tutorial003.py
from typing import List, Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(x_token: Union[List[str], None] = Header(default=None)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 224 bytes - Viewed (0) -
docs_src/header_params/tutorial003_an_py39.py
from typing import Annotated, List, Union from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 240 bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
def test_gzip_request(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} def test_request_class():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Nov 13 14:26:09 UTC 2022 - 886 bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt
} } private fun send404( stream: Http2Stream, path: String, ) { val responseHeaders = listOf( Header(":status", "404"), Header(":version", "HTTP/1.1"), Header("content-type", "text/plain"), ) stream.writeHeaders( responseHeaders = responseHeaders, outFinished = false, flushHeaders = false, )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.1K bytes - Viewed (0) -
docs/extensions/s3zip/examples/aws-js/main.js
signatureVersion: 'v4' }); // List all contents stored in the zip archive s3.listObjectsV2({Bucket : 'your-bucket', Prefix: 'path/to/file.zip/'}). on('build', function(req) { req.httpRequest.headers['X-Minio-Extract'] = 'true'; }). send(function(err, data) { if (err) { console.log("Error", err); } else { console.log("Success", data); } });
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jun 10 15:17:03 UTC 2021 - 1K bytes - Viewed (0) -
docs/sts/client_grants/__init__.py
method = self.METHOD def fetch_credentials(): # HTTP headers are case insensitive filter out # all duplicate headers and pick one. headers = {} headers['content-type'] = 'application/x-www-form-urlencoded' headers['authorization'] = urllib3.make_headers( basic_auth='%s:%s' % (self.cid, self.csec))['authorization']
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 4.6K bytes - Viewed (0) -
docs_src/dependencies/tutorial006.py
from fastapi import Depends, FastAPI, Header, HTTPException app = FastAPI() async def verify_token(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: str = Header()): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 583 bytes - Viewed (0) -
cmd/healthcheck-handler.go
DeploymentType: r.Form.Get("deployment-type"), } result := objLayer.Health(ctx, opts) w.Header().Set(xhttp.MinIOWriteQuorum, strconv.Itoa(result.WriteQuorum)) w.Header().Set(xhttp.MinIOStorageClassDefaults, strconv.FormatBool(result.UsingDefaults)) // return how many drives are being healed if any if result.HealingDrives > 0 { w.Header().Set(xhttp.MinIOHealingDrives, strconv.Itoa(result.HealingDrives)) } if !result.Healthy {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 26 07:44:34 UTC 2024 - 6.9K bytes - Viewed (0) -
docs_src/dependencies/tutorial012.py
from fastapi import Depends, FastAPI, Header, HTTPException async def verify_token(x_token: str = Header()): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: str = Header()): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid") return x_key
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 696 bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an_py39.py
assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" @needs_py39 def test_token(client: TestClient): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0)