- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 146 for 4064 (0.02 seconds)
-
docs_src/dependencies/tutorial008c_an_py310.py
raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 700 bytes - Click Count (0) -
docs_src/dependencies/tutorial008b_py310.py
@app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 735 bytes - Click Count (0) -
cmd/signature-v2.go
} cred, _, s3Err := checkKeyValid(r, accessKey) if s3Err != ErrNone { return s3Err } // Make sure the request has not expired. expiresInt, err := strconv.ParseInt(expires, 10, 64) if err != nil { return ErrMalformedExpires } // Check if the presigned URL has expired. if expiresInt < UTCNow().Unix() { return ErrExpiredPresignRequest }
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 12.2K bytes - Click Count (0) -
docs/fr/docs/tutorial/handling-errors.md
Les codes d'état dans la plage des 400 signifient qu'il y a eu une erreur côté client. Vous souvenez-vous de toutes ces erreurs **« 404 Not Found »** (et des blagues) ? ## Utiliser `HTTPException` { #use-httpexception } Pour renvoyer au client des réponses HTTP avec des erreurs, vous utilisez `HTTPException`.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 10K bytes - Click Count (0) -
tests/test_tutorial/test_additional_responses/test_tutorial004.py
"info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "get": { "responses": { "404": {"description": "Item not found"}, "302": {"description": "The item was moved"}, "403": {"description": "Not enough privileges"}, "200": {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 10:53:47 GMT 2026 - 5.5K bytes - Click Count (0) -
regression-test/src/androidTest/java/okhttp/regression/IssueReproductionTest.java
Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { assertTrue(response.code() == 200 || response.code() == 404); assertEquals(Protocol.HTTP_2, response.protocol()); for (Certificate c: response.handshake().peerCertificates()) { X509Certificate x = (X509Certificate) c; System.out.println(x.getSubjectDN());
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jul 26 06:37:08 GMT 2021 - 1.9K bytes - Click Count (0) -
tests/test_route_scope.py
response = client.post("/users/rick") assert response.status_code == 405, response.text def test_invalid_path_doesnt_match(): response = client.post("/usersx/rick") assert response.status_code == 404, response.text def test_websocket(): with client.websocket_connect("/items/portal-gun") as websocket: data = websocket.receive_json()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.5K bytes - Click Count (0) -
docs/zh/docs/tutorial/handling-errors.md
本例中,客户端用不存在的 `ID` 请求 `item` 时,触发状态码为 `404` 的异常: {* ../../docs_src/handling_errors/tutorial001_py310.py hl[11] *} ### 响应结果 { #the-resulting-response } 请求为 `http://example.com/items/foo`(`item_id` 为 `"foo"`)时,客户端会接收到 HTTP 状态码 200 及如下 JSON 响应结果: ```JSON { "item": "The Foo Wrestlers" } ``` 但如果客户端请求 `http://example.com/items/bar`(不存在的 `item_id` `"bar"`),则会接收到 HTTP 状态码 404(“未找到”错误)及如下 JSON 响应结果: ```JSON {Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 8.2K bytes - Click Count (0) -
docs/uk/docs/how-to/conditional-openapi.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 3.9K bytes - Click Count (0) -
internal/auth/credentials.go
// ExpToInt64 - convert input interface value to int64. func ExpToInt64(expI any) (expAt int64, err error) { switch exp := expI.(type) { case string: expAt, err = strconv.ParseInt(exp, 10, 64) case float64: expAt, err = int64(exp), nil case int64: expAt, err = exp, nil case int: expAt, err = int64(exp), nil case uint64: expAt, err = int64(exp), nil case uint:
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 11.8K bytes - Click Count (0)