- Sort Score
- Result 10 results
- Languages All
Results 401 - 410 of 1,928 for post (0.06 sec)
-
docs_src/sql_databases/tutorial001.py
def get_session(): with Session(engine) as session: yield session app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/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) -
docs_src/sql_databases/tutorial001_py310.py
def get_session(): with Session(engine) as session: yield session app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/heroes/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostString.java
+ " * _1.0_ May 6, 2013\n" + " * _1.1_ June 15, 2013\n" + " * _1.2_ August 11, 2013\n"; Request request = new Request.Builder() .url("https://api.github.com/markdown/raw") .post(RequestBody.create(postBody, MEDIA_TYPE_MARKDOWN)) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 1.7K bytes - Viewed (0) -
fess-crawler/src/test/resources/ajax/index.html
<li><a href="javascript:void(0)" onclick="openPage('menu-2-2.html')">Menu 2-2</a></li> </ul> </div> <div id="content"></div> <div id="form"> <form method="post" action="form.html"> <input type="text" name="query" value="aaa"> <input type="hidden" name="secret" value="xxx"> <input type="submit" name="Submit"> </form> </div>
Registered: Sun Nov 10 03:50:12 UTC 2024 - Last Modified: Sun Oct 11 02:16:55 UTC 2015 - 1.5K bytes - Viewed (0) -
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)