HTTP Tests


The following example retrieves the HTTP response code of an HTTP call.

$ curl

Exemple HTTP code

HTTP modes and sub-tests#

Execute HTTP requests with the Tornado HTTPClient class. The probe has several modes:

codedefault Returns the HTTP response code.
substrAllows the use of regular expression to extract information from the response body.
jsonParses the response body as JSON and allows looking for a value trough the object.
headerReturns the specified header of the response.
durationReturns the execution time of the request.
geodurationReturns the execution time of the request by querying multiple DNS servers for the geographic zone.

All parameters of the tornado.httpclient.HTTPRequest constructor are valid and can be used as arguments when submitting an http test. For convenience the mostly used are listed in the table below along with some extensions:

regexstring Regular expression to match against the response body. Used in substr mode.
path or propertystring The path to a value within an object. Used in json mode. Ex: servers[0].interfaces[0].ip_address would extract the value of the field ip_address.
headerstring Extract specific header from the response object. Used in header mode.
onecurl_idUUID References OneCurl object to get request parameters from.
follow_redirects1 or 0 Allow request to follow the redirect. By default 1
validate_cert1 or 0 Ask to validate the SSL certificate. By default 1


The following example retrieves the Content-Type header of an HTTP response.

$ curl'