- Sort Score
- Result 10 results
- Languages All
Results 981 - 990 of 1,926 for App (0.01 sec)
-
tests/test_tutorial/test_generate_clients/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.generate_clients.tutorial002_py39 import app client = TestClient(app) def test_post_items(): response = client.post("/items/", json={"name": "Foo", "price": 5}) assert response.status_code == 200, response.text assert response.json() == {"message": "Item received"} def test_post_users(): response = client.post(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial001_py39 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial005_py39 import app client = TestClient(app) def test_post_validation_error(): response = client.post("/items/", json={"title": "towel", "size": "XL"}) assert response.status_code == 422, response.text assert response.json() == { "detail": [ { "type": "int_parsing", "loc": ["body", "size"],
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/dict/kuromoji/AdminDictKuromojiAction.java
import org.codelibs.fess.annotation.Secured; import org.codelibs.fess.app.pager.KuromojiPager; import org.codelibs.fess.app.service.KuromojiService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.admin.dict.AdminDictAction; import org.codelibs.fess.app.web.base.FessAdminAction; import org.codelibs.fess.app.web.base.FessBaseAction; import org.codelibs.fess.dict.kuromoji.KuromojiItem;
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 21.5K bytes - Viewed (0) -
docs/pt/docs/advanced/middleware.md
```Python from unicorn import UnicornMiddleware app = SomeASGIApp() new_app = UnicornMiddleware(app, some_config="rainbow") ``` Mas, o FastAPI (na verdade, o Starlette) fornece uma maneira mais simples de fazer isso que garante que os middlewares internos lidem com erros do servidor e que os manipuladores de exceções personalizados funcionem corretamente. Para isso, você usa `app.add_middleware()` (como no exemplo para CORS). ```Python
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.7K bytes - Viewed (0) -
docs/zh/docs/advanced/middleware.md
```Python from unicorn import UnicornMiddleware app = SomeASGIApp() new_app = UnicornMiddleware(app, some_config="rainbow") ``` 但 FastAPI(实际上是 Starlette)提供了一种更简单的方式,能让内部中间件在处理服务器错误的同时,还能让自定义异常处理器正常运作。 为此,要使用 `app.add_middleware()` (与 CORS 中的示例一样)。 ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI() app.add_middleware(UnicornMiddleware, some_config="rainbow") ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 3.5K bytes - Viewed (0) -
tests/test_top_level_security_scheme_in_openapi.py
from fastapi.security import HTTPBearer from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() bearer_scheme = HTTPBearer() @app.get("/", dependencies=[Depends(bearer_scheme)]) async def get_root(): return {"message": "Hello, World!"} client = TestClient(app) def test_get_root(): response = client.get("/", headers={"Authorization": "Bearer token"})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.9K bytes - Viewed (0) -
docs/en/docs/tutorial/index.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 5.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/scheduler/SearchBody.java
* either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.codelibs.fess.app.web.api.admin.scheduler; import org.codelibs.fess.app.web.api.admin.BaseSearchBody; /** * Search request body for scheduler administration API. */ public class SearchBody extends BaseSearchBody { /** * Default constructor.Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 994 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/labeltype/AdminLabeltypeAction.java
import org.codelibs.fess.Constants; import org.codelibs.fess.annotation.Secured; import org.codelibs.fess.app.pager.LabelTypePager; import org.codelibs.fess.app.service.LabelTypeService; import org.codelibs.fess.app.service.RoleTypeService; import org.codelibs.fess.app.web.CrudMode; import org.codelibs.fess.app.web.base.FessAdminAction; import org.codelibs.fess.helper.PermissionHelper; import org.codelibs.fess.helper.SystemHelper;
Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Thu Nov 27 07:01:25 UTC 2025 - 17.6K bytes - Viewed (0)