- Sort Score
- Num 10 results
- Language All
Results 281 - 290 of 853 for pos2 (0.16 seconds)
-
docs_src/path_operation_configuration/tutorial005_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/", summary="Create an item", response_description="The created item", ) async def create_item(item: Item) -> Item: """ Create an item with all the information:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 12:07:26 GMT 2026 - 681 bytes - Click Count (0) -
docs/lambda/README.md
Following is an example lambda handler. ```py from flask import Flask, request, abort, make_response import requests app = Flask(__name__) @app.route('/', methods=['POST']) def get_webhook(): if request.method == 'POST': # obtain the request event from the 'POST' call event = request.json object_context = event["getObjectContext"] # Get the presigned URL to fetch the requested # original object from MinIO
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Aug 12 18:20:36 GMT 2025 - 7.7K bytes - Click Count (0) -
docs/zh/docs/tutorial/server-sent-events.md
当连接中断后浏览器重新连接时,会在 `Last-Event-ID` 头中发送上次收到的 `id`。 你可以将其读取为一个请求头参数,并据此从客户端离开的地方恢复流: {* ../../docs_src/server_sent_events/tutorial004_py310.py hl[25,27,31] *} ## 使用 POST 的 SSE { #sse-with-post } SSE 适用于**任意 HTTP 方法**,不仅仅是 `GET`。 这对像 [MCP](https://modelcontextprotocol.io) 这样通过 `POST` 传输 SSE 的协议很有用: {* ../../docs_src/server_sent_events/tutorial005_py310.py hl[14] *} ## 技术细节 { #technical-details } FastAPI 开箱即用地实现了一些 SSE 的最佳实践。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:29:48 GMT 2026 - 4.6K bytes - Click Count (0) -
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
} @Test fun dataPost() { val request = fromArgs("-d", "foo", "http://example.com").createRequest() val body = request.body assertThat(request.method).isEqualTo("POST") assertThat(request.url.toString()).isEqualTo("http://example.com/") assertThat(body!!.contentType().toString()).isEqualTo( "application/x-www-form-urlencoded; charset=utf-8", )
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 4.3K bytes - Click Count (0) -
docs/zh/docs/tutorial/request-forms.md
但当表单包含文件时,会编码为 `multipart/form-data`。你将在下一章阅读如何处理文件。 如果你想了解更多关于这些编码和表单字段的信息,请参阅 [<abbr title="Mozilla Developer Network - Mozilla 开发者网络">MDN</abbr> Web 文档的 `POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)。 /// /// warning 你可以在一个路径操作中声明多个 `Form` 参数,但不能同时再声明要接收为 JSON 的 `Body` 字段,因为此时请求体会使用 `application/x-www-form-urlencoded` 而不是 `application/json` 进行编码。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 2.5K bytes - Click Count (0) -
scripts/playwright/sql_databases/image02.py
# Update the viewport manually context = browser.new_context(viewport={"width": 960, "height": 1080}) page = context.new_page() page.goto("http://localhost:8000/docs") page.get_by_label("post /heroes/").click() # Manually add the screenshot page.screenshot(path="docs/en/docs/img/tutorial/sql-databases/image02.png") # --------------------- context.close() browser.close()Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.1K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/relatedquery/ApiAdminRelatedqueryAction.java
* * @param body the related query configuration data to create * @return JSON response containing the created related query ID and status */ // POST /api/admin/relatedquery/setting @Execute public JsonResponse<ApiResult> post$setting(final CreateBody body) { validateApi(body, messages -> {}); body.crudMode = CrudMode.CREATE;Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Aug 07 03:06:29 GMT 2025 - 8.4K bytes - Click Count (0) -
docs/ko/docs/tutorial/response-status-code.md
응답 모델을 지정하는 것과 같은 방법으로, 어떤 *경로 처리*에서든 `status_code` 매개변수를 사용하여 응답에 사용할 HTTP 상태 코드를 선언할 수도 있습니다: * `@app.get()` * `@app.post()` * `@app.put()` * `@app.delete()` * 등 {* ../../docs_src/response_status_code/tutorial001_py310.py hl[6] *} /// note | 참고 `status_code` 는 "데코레이터" 메소드(`get`, `post` 등)의 매개변수입니다. 모든 매개변수들과 본문처럼 *경로 처리 함수*가 아닙니다. /// `status_code` 매개변수는 HTTP 상태 코드를 숫자로 입력받습니다. /// info | 정보
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 4.7K bytes - Click Count (0) -
tests/test_request_params/test_file/utils.py
from typing import Any def get_body_model_name(openapi: dict[str, Any], path: str) -> str: body = openapi["paths"][path]["post"]["requestBody"] body_schema = body["content"]["multipart/form-data"]["schema"]
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 271 bytes - Click Count (0) -
docs_src/request_forms_and_files/tutorial001_py310.py
from fastapi import FastAPI, File, Form, UploadFile app = FastAPI() @app.post("/files/") async def create_file( file: bytes = File(), fileb: UploadFile = File(), token: str = Form() ): return { "file_size": len(file), "token": token, "fileb_content_type": fileb.content_type,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 317 bytes - Click Count (0)