LibraryActive

FastAPI Request class

FastAPI's Request class gives direct access to the raw Starlette HTTP request.

Open source page

Product features

Product features

Body and stream

Async stream and body methods to read the request payload.

Example ¶

FastAPI Conf ¶

FastAPI mini documentary ¶

FastAPI ¶

Gold Sponsors ¶

HTTP and WebSocket compatibility

Use HTTPConnection instead of Request to support both HTTP and WebSockets.

Installation ¶

JSON and form parsing

Async json and form methods parse the request payload.

Keystone Sponsor ¶

Opinions ¶

Raw request access

Declare a Request parameter in a path operation or dependency to access the raw request object without validation.

Requirements ¶

Silver Sponsors ¶

Sponsors ¶

Typer , the FastAPI of CLIs ¶

url_for

Build a URL for a named route from the request.