Framework Reference# The App Class WSGI App ASGI App Options Request & Response WSGI Request & Response ASGI Request & Response WebSocket (ASGI Only) Usage Lost Connections Error Handling Media Handlers Extended Example Testing Reference Cookies Getting Cookies Setting Cookies The Secure Attribute The SameSite Attribute The Partitioned Attribute Status Codes HTTPStatus 1xx Informational 2xx Success 3xx Redirection 4xx Client Error 5xx Server Error Error Handling Base Class Predefined Errors Media Usage Validating Media Content-Type Negotiation Exception Handling Replacing the Default Handlers Supported Handler Types Custom Handler Type Handlers Mapping Media Type Constants Multipart Forms Multipart Form and Body Part Types Parser Configuration Parsing Options Parsing Errors Redirection HTTPMovedPermanently HTTPFound HTTPSeeOther HTTPTemporaryRedirect HTTPPermanentRedirect Middleware Short-Circuiting Exception Handling CORS Usage CORSMiddleware Hooks Before Hooks After Hooks Routing Default Behavior Field Converters Built-in Converters Custom Converters Custom Routers Suffixed Responders Default Router Routing Utilities Custom HTTP Methods Inspect Module Using Inspect Functions Inspect Functions Reference Router Inspection Information Classes Visitor Classes Utilities URI Date and Time HTTP Status Media types Async Other Testing Helpers Simulating Requests Other Helpers Typing Known Limitations Public Type Aliases