astronomer.providers.http.hooks.http¶
Classes¶
This class is deprecated and will be removed in 2.0.0. |
Module Contents¶
- class astronomer.providers.http.hooks.http.HttpHookAsync(method='POST', http_conn_id=default_conn_name, auth_type=aiohttp.BasicAuth, retry_limit=3, retry_delay=1.0, *, keep_response=False)[source]¶
Bases:
airflow.hooks.base.BaseHook
This class is deprecated and will be removed in 2.0.0. Use :class: ~airflow.providers.http.hooks.http.HttpAsyncHook instead.
- conn_name_attr = 'http_conn_id'¶
- default_conn_name = 'http_default'¶
- conn_type = 'http'¶
- hook_name = 'HTTP'¶
- http_conn_id¶
- method¶
- base_url: str = ''¶
- auth_type: Any¶
- retry_limit¶
- retry_delay¶
- keep_response¶
- async run(endpoint=None, data=None, headers=None, extra_options=None)[source]¶
Performs an asynchronous HTTP request call
- Parameters:
endpoint (str | None) – the endpoint to be called i.e. resource/v1/query?
data (dict[str, Any] | str | None) – payload to be uploaded or request parameters
headers (dict[str, Any] | None) – additional headers to be passed through as a dictionary
extra_options (dict[str, Any] | None) – Additional kwargs to pass when creating a request. For example,
run(json=obj)
is passed asaiohttp.ClientSession().get(json=obj)