Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.http Namespace Reference

Classes

class  HomeAssistantView
 

Functions

Callable[[web.Request], Awaitable[web.StreamResponse]] request_handler_factory (HomeAssistant hass, HomeAssistantView view, Callable handler)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 AllowCorsType
 
 default
 
 Final
 
 KEY_ALLOW_ALL_CORS = AppKey[AllowCorsType]("allow_all_cors")
 
 KEY_ALLOW_CONFIGURED_CORS = AppKey[AllowCorsType]("allow_configured_cors")
 

Detailed Description

Helper to track the current http request.

Function Documentation

◆ request_handler_factory()

Callable[[web.Request], Awaitable[web.StreamResponse]] homeassistant.helpers.http.request_handler_factory ( HomeAssistant  hass,
HomeAssistantView  view,
Callable   handler 
)
Wrap the handler classes.

Definition at line 44 of file http.py.

Variable Documentation

◆ _LOGGER

homeassistant.helpers.http._LOGGER = logging.getLogger(__name__)
private

Definition at line 30 of file http.py.

◆ AllowCorsType

homeassistant.helpers.http.AllowCorsType

Definition at line 33 of file http.py.

◆ default

homeassistant.helpers.http.default

Definition at line 40 of file http.py.

◆ Final

homeassistant.helpers.http.Final

Definition at line 34 of file http.py.

◆ KEY_ALLOW_ALL_CORS

homeassistant.helpers.http.KEY_ALLOW_ALL_CORS = AppKey[AllowCorsType]("allow_all_cors")

Definition at line 35 of file http.py.

◆ KEY_ALLOW_CONFIGURED_CORS

homeassistant.helpers.http.KEY_ALLOW_CONFIGURED_CORS = AppKey[AllowCorsType]("allow_configured_cors")

Definition at line 36 of file http.py.