Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,307 for posAt (0.04 sec)

  1. src/cmd/compile/internal/test/testdata/zero_test.go

    // Code generated by gen/zeroGen.go. DO NOT EDIT.
    
    package main
    
    import "testing"
    
    type Z1 struct {
    	pre  [8]byte
    	mid  [1]byte
    	post [8]byte
    }
    
    //go:noinline
    func zero1_ssa(x *[1]byte) {
    	*x = [1]byte{}
    }
    func testZero1(t *testing.T) {
    	a := Z1{[8]byte{255, 255, 255, 255, 255, 255, 255, 255}, [1]byte{255}, [8]byte{255, 255, 255, 255, 255, 255, 255, 255}}
    	zero1_ssa(&a.mid)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 49.6K bytes
    - Viewed (0)
  2. pkg/config/analysis/analyzers/testdata/authorizationpolicies.yaml

            - source:
                namespaces: ["httpbin"] # Namespace exists
          to:
            - operation:
                methods: ["GET"]
                paths: ["/info*"]
            - operation:
                methods: ["POST"]
                paths: ["/data"]
          when:
            - key: request.auth.claims[iss]
              values: ["https://accounts.google.com"]
    ---
    apiVersion: security.istio.io/v1beta1
    kind: AuthorizationPolicy
    metadata:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 08 14:14:46 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  3. tests/test_union_body.py

    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class OtherItem(BaseModel):
        price: int
    
    
    @app.post("/items/")
    def save_union_body(item: Union[OtherItem, Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    def test_post_other_item():
        response = client.post("/items/", json={"price": 100})
        assert response.status_code == 200, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_files/test_tutorial002_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial002_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        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
    - 8.5K bytes
    - Viewed (0)
  5. docs_src/request_files/tutorial002_py39.py

    from fastapi import FastAPI, File, UploadFile
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: list[bytes] = File()):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: list[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    async def main():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 786 bytes
    - Viewed (0)
  6. tests/test_modules_same_name_body/test_main.py

    client = TestClient(app)
    
    
    def test_post_a():
        data = {"a": 2, "b": "foo"}
        response = client.post("/a/compute", json=data)
        assert response.status_code == 200, response.text
        data = response.json()
    
    
    def test_post_a_invalid():
        data = {"a": "bar", "b": "foo"}
        response = client.post("/a/compute", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_post_b():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  7. docs_src/request_files/tutorial002_an.py

    from fastapi.responses import HTMLResponse
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: Annotated[List[bytes], File()]):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: List[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 861 bytes
    - Viewed (0)
  8. src/net/http/httptest/httptest_test.go

    					HandshakeComplete: true,
    					ServerName:        "foo.com",
    				},
    			},
    			wantBody: "",
    		},
    
    		{
    			name:   "Post with known length",
    			method: "POST",
    			uri:    "/",
    			body:   strings.NewReader("foo"),
    			want: &http.Request{
    				Method:        "POST",
    				Host:          "example.com",
    				URL:           &url.URL{Path: "/"},
    				Header:        http.Header{},
    				Proto:         "HTTP/1.1",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 18:09:14 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. docs_src/request_files/tutorial003_an_py39.py

    from fastapi import FastAPI, File, UploadFile
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(
        files: Annotated[list[bytes], File(description="Multiple files as bytes")],
    ):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(
        files: Annotated[
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 952 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial002_an_py39.py

    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    @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
    - 8.9K bytes
    - Viewed (0)
Back to top