Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 393 for responses (0.19 sec)

  1. tests/test_annotated.py

        client = TestClient(app)
        response = client.get("/test1")
        assert response.status_code == 200
        assert response.json() == {"foo": "bar"}
    
        response = client.get("/test1", params={"var": "baz"})
        assert response.status_code == 200
        assert response.json() == {"foo": "baz"}
    
        response = client.get("/test2")
        assert response.status_code == 200
        assert response.json() == {"foo": "bar"}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_2x.md

        ```
    
     *  New: Make the content-type header optional for request bodies.
     *  New: `Response.isSuccessful()` is a convenient API to check response codes.
     *  New: The response body can now be read outside of the callback. Response
        bodies must always be closed, otherwise they will leak connections!
     *  New: APIs to create multipart request bodies (`MultipartBuilder`) and form
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  3. tests/test_openapi_examples.py

    
    def test_call_api():
        response = client.post("/examples/", json={"data": "example1"})
        assert response.status_code == 200, response.text
    
        response = client.get("/path_examples/foo")
        assert response.status_code == 200, response.text
    
        response = client.get("/query_examples/")
        assert response.status_code == 200, response.text
    
        response = client.get("/header_examples/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 17K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py310
    # TODO: pv2 add version with Pydantic v2
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py

        test_user = {"email": "******@****.***", "password": "secret"}
        response = client.post("/users/", json=test_user)
        assert response.status_code == 200, response.text
        data = response.json()
        assert test_user["email"] == data["email"]
        assert "id" in data
        response = client.post("/users/", json=test_user)
        assert response.status_code == 400, response.text
    
    
    @needs_py39
    # TODO: pv2 add version with Pydantic v2
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/bigger-applications.md

    ### Einige benutzerdefinierte `tags`, `responses`, und `dependencies` hinzufügen
    
    Wir fügen weder das Präfix `/items` noch `tags=["items"]` zu jeder *Pfadoperation* hinzu, da wir sie zum `APIRouter` hinzugefügt haben.
    
    Aber wir können immer noch _mehr_ `tags` hinzufügen, die auf eine bestimmte *Pfadoperation* angewendet werden, sowie einige zusätzliche `responses`, die speziell für diese *Pfadoperation* gelten:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:27:59 GMT 2024
    - 21.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005_an_py310.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py310
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. tests/test_tuples.py

        response = client.post("/tuple-of-models/", json=data)
        assert response.status_code == 422, response.text
    
        data = [{"x": 1, "y": 2}]
        response = client.post("/tuple-of-models/", json=data)
        assert response.status_code == 422, response.text
    
    
    def test_tuple_form_valid():
        response = client.post("/tuple-form/", data={"values": ("1", "2")})
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Response.kt

        }
    
        internal constructor(response: Response) {
          this.request = response.request
          this.protocol = response.protocol
          this.code = response.code
          this.message = response.message
          this.handshake = response.handshake
          this.headers = response.headers.newBuilder()
          this.body = response.body
          this.networkResponse = response.networkResponse
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
Back to top