| :mod:`airflow.sensors.http_sensor` |
| ================================== |
| |
| .. py:module:: airflow.sensors.http_sensor |
| |
| |
| Module Contents |
| --------------- |
| |
| .. py:class:: HttpSensor(endpoint, http_conn_id='http_default', method='GET', request_params=None, headers=None, response_check=None, extra_options=None, *args, **kwargs) |
| |
| Bases: :class:`airflow.sensors.base_sensor_operator.BaseSensorOperator` |
| |
| Executes a HTTP get statement and returns False on failure: |
| 404 not found or response_check function returned False |
| |
| :param http_conn_id: The connection to run the sensor against |
| :type http_conn_id: str |
| :param method: The HTTP request method to use |
| :type method: str |
| :param endpoint: The relative part of the full url |
| :type endpoint: str |
| :param request_params: The parameters to be added to the GET url |
| :type request_params: a dictionary of string key/value pairs |
| :param headers: The HTTP headers to be added to the GET request |
| :type headers: a dictionary of string key/value pairs |
| :param response_check: A check against the 'requests' response object. |
| Returns True for 'pass' and False otherwise. |
| :type response_check: A lambda or defined function. |
| :param extra_options: Extra options for the 'requests' library, see the |
| 'requests' documentation (options to modify timeout, ssl, etc.) |
| :type extra_options: A dictionary of options, where key is string and value |
| depends on the option that's being modified. |
| |
| .. attribute:: template_fields |
| :annotation: = ['endpoint', 'request_params'] |
| |
| |
| |
| |
| .. method:: poke(self, context) |
| |
| |
| |
| |