mirror of
https://github.com/fastapi/fastapi.git
synced 2026-02-06 20:31:56 -05:00
359 B
359 B
HTTPConnection class
When you want to define dependencies that should be compatible with both HTTP and WebSockets, you can define a parameter that takes an HTTPConnection instead of a Request or a WebSocket.
You can import it from fastapi.requests:
from fastapi.requests import HTTPConnection
::: fastapi.requests.HTTPConnection