Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 1,307 for posAt (0.04 sec)

  1. 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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  2. pilot/pkg/request/command_test.go

    		{
    			name:   "makes a request using passed method, url and body",
    			method: "POST",
    			path:   "/want/path",
    			body:   "body",
    			pilotStates: []pilotStubState{
    				{StatusCode: 200, Response: "fine", wantMethod: "POST", wantPath: "/want/path", wantBody: []byte("body")},
    			},
    		},
    		{
    			name:   "adds / prefix to path if required",
    			method: "POST",
    			path:   "want/path",
    			body:   "body",
    			pilotStates: []pilotStubState{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:11:01 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. docs_src/request_files/tutorial001_03.py

    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes = File(description="A file read as bytes")):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: UploadFile = File(description="A file read as UploadFile"),
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 371 bytes
    - Viewed (0)
  4. 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: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Thu Nov 07 15:16:39 UTC 2019
    - 2.9K bytes
    - Viewed (0)
  5. docs_src/request_files/tutorial001_02_py310.py

    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: bytes | None = File(default=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:
            return {"message": "No upload file sent"}
        else:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 470 bytes
    - Viewed (0)
  6. 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: Wed Jun 12 08:29:43 UTC 2024
    - Last Modified: Mon Nov 14 21:05:19 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. docs_src/request_files/tutorial001_02.py

    from typing import Union
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Union[bytes, None] = File(default=None)):
        if not file:
            return {"message": "No file sent"}
        else:
            return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: Union[UploadFile, None] = None):
        if not file:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 508 bytes
    - Viewed (0)
  8. src/net/http/request_test.go

    	}
    	if z := req.FormValue("z"); z != "post" {
    		t.Errorf(`req.FormValue("z") = %q, want "post"`, z)
    	}
    	if bq, found := req.PostForm["q"]; found {
    		t.Errorf(`req.PostForm["q"] = %q, want no entry in map`, bq)
    	}
    	if bz := req.PostFormValue("z"); bz != "post" {
    		t.Errorf(`req.PostFormValue("z") = %q, want "post"`, bz)
    	}
    	if qs := req.Form["q"]; !reflect.DeepEqual(qs, []string{"foo", "bar"}) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  9. docs_src/request_files/tutorial001_02_an.py

    from fastapi import FastAPI, File, UploadFile
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[Union[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: Union[UploadFile, None] = None):
        if not file:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 553 bytes
    - Viewed (0)
  10. docs_src/request_files/tutorial001_02_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[Union[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: Union[UploadFile, None] = None):
        if not file:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 524 bytes
    - Viewed (0)
Back to top