Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 1,327 for Responses (4.2 sec)

  1. tests/test_tutorial/test_header_params/test_tutorial003.py

        ],
    )
    def test(path, headers, expected_status, expected_response):
        response = client.get(path, headers=headers)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jan 12 14:52:00 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py

        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    @needs_py39
    def test_get_invalid_one_users(client: TestClient):
        response = client.get("/users/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_events/test_tutorial001.py

        with TestClient(app) as client:
            response = client.get("/items/foo")
            assert response.status_code == 200, response.text
            assert response.json() == {"name": "Fighters"}
    
    
    def test_openapi_schema(app: FastAPI):
        with TestClient(app) as client:
            response = client.get("/openapi.json")
            assert response.status_code == 200, response.text
            assert response.json() == {
                "openapi": "3.1.0",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/request-files.md

    !!! note "Technische Details"
        Sie kรถnnen auch `from starlette.responses import HTMLResponse` verwenden.
    
        **FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit fรผr Sie, den Entwickler. Die meisten verfรผgbaren Responses kommen aber direkt von Starlette.
    
    ### Mehrere Datei-Uploads mit zusรคtzlichen Metadaten
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 17:58:08 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/request-files.md

        {!> ../../../docs_src/request_files/tutorial002_py39.py!}
        ```
    
    ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ“จ, ๐Ÿ“ฃ, `list` `bytes` โš–๏ธ `UploadFile`โ“‚.
    
    !!! note "๐Ÿ“ก โ„น"
        ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `from starlette.responses import HTMLResponse`.
    
        **FastAPI** ๐Ÿšš ๐ŸŽ `starlette.responses` `fastapi.responses` ๐Ÿช ๐Ÿ‘†, ๐Ÿ‘ฉโ€๐Ÿ’ป. โœ‹๏ธ ๐ŸŒ… ๐Ÿ’ช ๐Ÿ“จ ๐Ÿ‘Ÿ ๐Ÿ”— โšช๏ธโžก๏ธ ๐Ÿ’ƒ.
    
    ### ๐Ÿ’— ๐Ÿ“ ๐Ÿ“‚ โฎ๏ธ ๐ŸŒ– ๐Ÿ—ƒ
    
    & ๐ŸŽ ๐ŸŒŒ โญ, ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `File()` โš’ ๐ŸŒ– ๐Ÿ”ข, `UploadFile`:
    
    === "๐Ÿ 3๏ธโƒฃ.6๏ธโƒฃ & ๐Ÿ”›"
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. tests/test_security_oauth2_optional.py

    
    def test_security_oauth2_password_bearer_no_header():
        response = client.get("/users/me")
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_strict_login_no_data():
        response = client.post("/login")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. releasenotes/notes/pilot-autoscale.yaml

    releaseNotes:
      - |
        **Improved** the variables `PILOT_MAX_REQUESTS_PER_SECOND` (which rate limits the incoming requests, previously defaulted to 25.0)
        and `PILOT_PUSH_THROTTLE` (which limits the number of concurrent responses, previously defaulted to 100) to automatically scale with the
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 21 08:42:13 UTC 2023
    - 428 bytes
    - Viewed (0)
  8. fastapi/__init__.py

    from .param_functions import Path as Path
    from .param_functions import Query as Query
    from .param_functions import Security as Security
    from .requests import Request as Request
    from .responses import Response as Response
    from .routing import APIRouter as APIRouter
    from .websockets import WebSocket as WebSocket
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu May 02 22:50:18 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  9. pilot/pkg/xds/debuggen.go

    	hreq, _ := http.NewRequest(http.MethodGet, debugURL, nil)
    	handler, _ := dg.DebugMux.Handler(hreq)
    	response := NewResponseCapture()
    	handler.ServeHTTP(response, hreq)
    	if response.wroteHeader && len(response.header) >= 1 {
    		header, _ := json.Marshal(response.header)
    		buffer.Write(header)
    	}
    	buffer.Write(response.body.Bytes())
    	return buffer
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 04 18:51:52 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/request-files.md

    !!! note "Technical Details"
        You could also use `from starlette.responses import HTMLResponse`.
    
        **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    ### Multiple File Uploads with Additional Metadata
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 10.2K bytes
    - Viewed (0)
Back to top