- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 1,928 for post (0.05 sec)
-
tests/test_tutorial/test_request_files/test_tutorial001_02_py310.py
return client @needs_py310 def test_post_form_no_body(client: TestClient): response = client.post("/files/") assert response.status_code == 200, response.text assert response.json() == {"message": "No file sent"} @needs_py310 def test_post_uploadfile_no_body(client: TestClient): response = client.post("/uploadfile/") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.5K bytes - Viewed (0) -
docs_src/request_files/tutorial001_02_an_py310.py
from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes | None, File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile | None = None): if not file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 505 bytes - Viewed (0) -
docs_src/request_files/tutorial001_an_py39.py
from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes, File()]): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 322 bytes - Viewed (0) -
docs_src/openapi_webhooks/tutorial001.py
app = FastAPI() class Subscription(BaseModel): username: str monthly_fee: float start_date: datetime @app.webhooks.post("new-subscription") def new_subscription(body: Subscription): """ When a new user subscribes to your service we'll send you a POST request with this data to the URL that you register for the event `new-subscription` in the dashboard. """ @app.get("/users/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 20 09:00:44 UTC 2023 - 550 bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_an.py
path2 = tmp_path / "test2.txt" path2.write_bytes(b"<file content2>") client = TestClient(app) with path.open("rb") as file, path2.open("rb") as file2: response = client.post( "/files/", files=( ("files", ("test.txt", file)), ("files", ("test2.txt", file2)), ), ) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.1K bytes - Viewed (0) -
docs_src/request_files/tutorial001_03_an.py
from fastapi import FastAPI, File, UploadFile from typing_extensions import Annotated app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]): return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file( file: Annotated[UploadFile, File(description="A file read as UploadFile")], ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 431 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/badword/ApiAdminBadwordAction.java
} return asJson(new ApiResult.ApiUpdateResponse().id(entity.getId()).created(true).status(ApiResult.Status.OK).result()); } // POST /api/admin/user/setting @Execute public JsonResponse<ApiResult> post$setting(final EditBody body) { validateApi(body, messages -> {}); body.crudMode = CrudMode.EDIT; final BadWord badWord = getBadWord(body).map(entity -> {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/test_regex_deprecated_body.py
return client @needs_py310 def test_no_query(): client = get_client() response = client.post("/items/") assert response.status_code == 200 assert response.json() == "Hello World" @needs_py310 def test_q_fixedquery(): client = get_client() response = client.post("/items/", data={"q": "fixedquery"}) assert response.status_code == 200 assert response.json() == "Hello fixedquery"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt
includeIPv6: Boolean, post: Boolean = false, ): DnsOverHttps { val url = server.url("/lookup?ct") return DnsOverHttps.Builder().client(bootstrapClient) .includeIPv6(includeIPv6) .resolvePrivateAddresses(true) .url(url) .post(post) .build() } companion object { private fun address(host: String) = InetAddress.getByName(host) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 11K bytes - Viewed (0) -
src/main/java/org/codelibs/curl/Curl.java
// nothing } public static CurlRequest get(final String url) { return new CurlRequest(Method.GET, url); } public static CurlRequest post(final String url) { return new CurlRequest(Method.POST, url); } public static CurlRequest put(final String url) { return new CurlRequest(Method.PUT, url); } public static CurlRequest delete(final String url) {
Registered: Thu Oct 31 02:32:13 UTC 2024 - Last Modified: Mon Nov 14 21:05:19 UTC 2022 - 1.7K bytes - Viewed (0)