- Sort Score
- Result 10 results
- Languages All
Results 391 - 400 of 1,708 for Post (0.02 sec)
-
docs_src/app_testing/app_b_an_py310/main.py
raise HTTPException(status_code=400, detail="Invalid X-Token header") if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item) async def create_item(item: Item, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/vi/docs/tutorial/first-steps.md
Trong khi xây dựng một API, "đường dẫn" là các chính để phân tách "mối quan hệ" và "tài nguyên". #### Toán tử (Operation) "Toán tử" ở đây được nhắc tới là một trong các "phương thức" HTTP. Một trong những: * `POST` * `GET` * `PUT` * `DELETE` ...và một trong những cái còn lại: * `OPTIONS` * `HEAD` * `PATCH` * `TRACE`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002_py310.py
def test(): from docs_src.background_tasks.tutorial002_py310 import app client = TestClient(app) log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***?q=some-query") assert response.status_code == 200, response.text assert response.json() == {"message": "Message sent"} with open("./log.txt") as f:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 628 bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
def test_admin(client: TestClient): response = client.post( "/admin/?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200, response.text assert response.json() == {"message": "Admin getting schwifty"} def test_admin_invalid_header(client: TestClient): response = client.post("/admin/", headers={"X-Token": "invalid"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.6K bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial004_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 638 bytes - Viewed (0) -
cmd/admin-handlers-idp-config.go
ctx := r.Context() addOrUpdateIDPHandler(ctx, w, r, false) } // UpdateIdentityProviderCfg: updates an existing IDP config for openid/ldap. // // POST <admin-prefix>/idp-cfg/openid/dex1 -> update named config `dex1` // // POST <admin-prefix>/idp-cfg/openid/_ -> update (default) named config `_` func (a adminAPIHandlers) UpdateIdentityProviderCfg(w http.ResponseWriter, r *http.Request) { ctx := r.Context()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 12.7K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/eventbus/EventBusBenchmark.java
void setUp() { eventBus = new EventBus("for benchmarking purposes"); eventBus.register(this); } @Benchmark void postStrings(int reps) { for (int i = 0; i < reps; i++) { eventBus.post("hello there"); } } @Subscribe public void handleStrings(String string) { // Nothing to do here. }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/first-steps.md
ここでの「オペレーション」とは、HTTPの「メソッド」の1つを指します。 以下のようなものの1つ: * `POST` * `GET` * `PUT` * `DELETE` ...さらによりエキゾチックなもの: * `OPTIONS` * `HEAD` * `PATCH` * `TRACE` HTTPプロトコルでは、これらの「メソッド」の1つ(または複数)を使用して各パスにアクセスできます。 --- APIを構築するときは、通常、これらの特定のHTTPメソッドを使用して特定のアクションを実行します。 通常は次を使用します: * `POST`: データの作成 * `GET`: データの読み取り * `PUT`: データの更新 * `DELETE`: データの削除 L246
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001.py
return await original_route_handler(request) return custom_route_handler app = FastAPI() app.router.route_class = GzipRoute @app.post("/sum") async def sum_numbers(numbers: List[int] = Body()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 973 bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an.py
yield session SessionDep = Annotated[Session, Depends(get_session)] app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: SessionDep) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/heroes/") def read_heroes(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0)