Search Options

Results per page
Sort
Preferred Languages
Advance

Results 231 - 240 of 1,673 for Response_ (0.04 sec)

  1. docs_src/response_model/tutorial003_04_py39.py

    from typing import Union
    
    from fastapi import FastAPI, Response
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/portal")
    async def get_portal(teleport: bool = False) -> Union[Response, dict]:
        if teleport:
            return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 384 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_nested_models/test_tutorial006.py

                ],
            },
        }
    
    
    def test_put_only_required(client: TestClient):
        response = client.put(
            "/items/5",
            json={"name": "Foo", "price": 35.4},
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "item_id": 5,
            "item": {
                "name": "Foo",
                "description": None,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_response/test_tutorial001.py

    
    def test_get_custom_response(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/extra-data-types.md

        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * Python `datetime.date`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `2008-09-15`.
    * `datetime.time`:
        * A Python `datetime.time`.
        * In requests and responses will be represented as a `str` in ISO 8601 format, like: `14:23:55.003`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/extra-data-types.md

        * Un `datetime.datetime` de Python.
        * En requests y responses se representará como un `str` en formato ISO 8601, como: `2008-09-15T15:53:00+05:00`.
    * `datetime.date`:
        * `datetime.date` de Python.
        * En requests y responses se representará como un `str` en formato ISO 8601, como: `2008-09-15`.
    * `datetime.time`:
        * Un `datetime.time` de Python.
        * En requests y responses se representará como un `str` en formato ISO 8601, como: `14:23:55.003`.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_operation_configurations/test_tutorial003_tutorial004.py

    
    def test_post_items(client: TestClient):
        response = client.post(
            "/items/",
            json={
                "name": "Foo",
                "description": "Item description",
                "price": 42.0,
                "tax": 3.2,
                "tags": ["bar", "baz"],
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Foo",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7K bytes
    - Viewed (0)
  7. README.md

    import org.codelibs.curl.CurlResponse;
    
    try (CurlResponse response = Curl.get("https://example.com")
                                    .param("q", "curl4j")
                                    .header("Accept", "application/json")
                                    .execute()) {
        System.out.println("Status: " + response.getHttpStatusCode());
        System.out.println(response.getContentAsString());
    }
    ```
    
    ### Asynchronous request
    
    Registered: Sat Dec 20 09:13:53 UTC 2025
    - Last Modified: Thu Nov 20 13:34:13 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  8. tests/test_wrapped_method_forward_reference.py

        app.post("/endpoint2")(passthrough(passthrough(forwardref_method)))
        with client:
            response = client.post("/endpoint", json={"input": {"x": 0}})
            response2 = client.post("/endpoint2", json={"input": {"x": 0}})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 02 17:23:14 UTC 2025
    - 997 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_nested_models/test_tutorial004.py

            },
        }
    
    
    def test_put_only_required(client: TestClient):
        response = client.put(
            "/items/5",
            json={"name": "Foo", "price": 35.4},
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "item_id": 5,
            "item": {
                "name": "Foo",
                "description": None,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/{item_id}": {
                    "put": {
                        "responses": {
                            "200": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.4K bytes
    - Viewed (0)
Back to top