- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 744 for POST (0.02 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_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) -
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_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) -
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) -
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) -
compat/maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-expected.xml
<mailingLists> <mailingList> <name>parent</name> <subscribe>******@****.***</subscribe> <unsubscribe>******@****.***</unsubscribe> <post>post@mailing.list.com</post> </mailingList> </mailingLists> <build> <plugins> <plugin> <groupId>inheritance.configuration</groupId> <artifactId>default</artifactId>
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 2.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Request.kt
/** * Constructs a new request. * * Use [Builder] for more fluent construction, including helper methods for various HTTP methods. * * @param method defaults to "GET" if [body] is null, and "POST" otherwise. */ constructor( url: HttpUrl, headers: Headers = headersOf(), // '\u0000' is a sentinel value that'll choose based on what the body is: method: String = "\u0000",
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:17:44 UTC 2024 - 10.5K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007_pv1.py
@needs_pydanticv1 def test_post(client: TestClient): yaml_data = """ name: Deadpoolio tags: - x-force - x-men - x-avengers """ response = client.post("/items/", content=yaml_data) assert response.status_code == 200, response.text assert response.json() == { "name": "Deadpoolio", "tags": ["x-force", "x-men", "x-avengers"], }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.2K bytes - Viewed (0)