Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,307 for posAt (0.24 sec)

  1. samples/guide/src/main/java/okhttp3/guide/PostExample.java

      final OkHttpClient client = new OkHttpClient();
    
      String post(String url, String json) throws IOException {
        RequestBody body = RequestBody.create(json, JSON);
        Request request = new Request.Builder()
            .url(url)
            .post(body)
            .build();
        try (Response response = client.newCall(request).execute()) {
          return response.body().string();
        }
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial003_an_py39.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.6K bytes
    - Viewed (0)
  3. maven-model-builder/src/test/resources/poms/inheritance/plugin-configuration-child.xml

      <artifactId>child</artifactId>
      <version>12-SNAPSHOT</version>
    
      <mailingLists>
        <!--mailingList> MNG-3124: no way to add a list to parent content, only full override
          <name>child</name>
          <post>post@mailing.list.com</post>
          <subscribe>******@****.***</subscribe>
          <unsubscribe>******@****.***</unsubscribe>
        </mailingList-->
      </mailingLists>
    
      <build>
        <plugins>
          <plugin>
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Thu Nov 07 15:16:39 UTC 2019
    - 2K bytes
    - Viewed (0)
  4. tests/postgres_test.go

    	}
    
    	DB.Migrator().DropTable(&Post{}, &Category{}, "post_categories")
    	DB.AutoMigrate(&Post{}, &Category{})
    
    	post := Post{
    		Title: "Hello World",
    		Categories: []*Category{
    			{Title: "Coding"},
    			{Title: "Golang"},
    		},
    	}
    
    	if err := DB.Create(&post).Error; err != nil {
    		t.Errorf("Failed, got error: %v", err)
    	}
    }
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Oct 08 09:16:32 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_files/test_tutorial002_py39.py

                "msg": "field required",
                "type": "value_error.missing",
            }
        ]
    }
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 9K bytes
    - Viewed (0)
  6. docs_src/request_files/tutorial001_03_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(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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 421 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial003.py

    client = TestClient(app)
    
    
    def test_login():
        response = client.post("/token", data={"username": "johndoe", "password": "secret"})
        assert response.status_code == 200, response.text
        assert response.json() == {"access_token": "johndoe", "token_type": "bearer"}
    
    
    def test_login_incorrect_password():
        response = client.post(
            "/token", data={"username": "johndoe", "password": "incorrect"}
        )
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_optional.py

    
    def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
        return form_data
    
    
    @app.get("/users/me")
    def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  9. 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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 505 bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/cache.go

    	values [2000]Value
    	blocks [200]Block
    	locs   [2000]Location
    
    	// Reusable stackAllocState.
    	// See stackalloc.go's {new,put}StackAllocState.
    	stackAllocState *stackAllocState
    
    	scrPoset []*poset // scratch poset to be reused
    
    	// Reusable regalloc state.
    	regallocValues []valState
    
    	ValueToProgAfter []*obj.Prog
    	debugState       debugState
    
    	Liveness interface{} // *gc.livenessFuncCache
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 15 23:00:54 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top