SimpleHttpOperator

HTTPCertified

Calls an endpoint on an HTTP system to execute an action

View on GitHub

Last Updated: Mar. 20, 2023

Access Instructions

Install the HTTP provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

http_conn_idThe http connection to run the operator against
endpointThe relative part of the full url. (templated)
methodThe HTTP method to use, default = “POST”
dataThe data to pass. POST-data in POST/PUT and params in the URL for a GET request. (templated)
headersThe HTTP headers to be added to the GET request
response_checkA check against the ‘requests’ response object. The callable takes the response object as the first positional argument and optionally any number of keyword arguments available in the context dictionary. It should return True for ‘pass’ and False otherwise.
response_filterA function allowing you to manipulate the response text. e.g response_filter=lambda response: json.loads(response.text). The callable takes the response object as the first positional argument and optionally any number of keyword arguments available in the context dictionary.
extra_optionsExtra options for the ‘requests’ library, see the ‘requests’ documentation (options to modify timeout, ssl, etc.)
log_responseLog the response (default: False)
auth_typeThe auth type for the service
tcp_keep_aliveEnable TCP Keep Alive for the connection.
tcp_keep_alive_idleThe TCP Keep Alive Idle parameter (corresponds to socket.TCP_KEEPIDLE).
tcp_keep_alive_countThe TCP Keep Alive count parameter (corresponds to socket.TCP_KEEPCNT)
tcp_keep_alive_intervalThe TCP Keep Alive interval parameter (corresponds to socket.TCP_KEEPINTVL)

Documentation

Calls an endpoint on an HTTP system to execute an action

See also

For more information on how to use this operator, take a look at the guide: SimpleHttpOperator

Was this page helpful?