http - fetch and verify a URL

Attempts to fetch a URL and makes sure the HTTP return code is (by default) 200/OK. Can also match the content of the page to a regular expression.

url
Type:

string

Required:

true

the URL to open

regexp
Type:

regexp

Required:

false

Default:

none

the regexp to look for in the body of the response

allowed_codes
Type:

comma-separated list of integer

Required:

false

Default:

200

a list of acceptable HTTP status codes

allow_redirects
Type:

bool

Required:

false

Default:

true

Follow redirects

username
Type:

str

Required:

false

Default:

none

Username for http basic auth

password
Type:

str

Required:

false

Default:

none

Password for http basic auth

verify_hostname
Type:

boolean

Required:

false

Default:

true

set to false to disable SSL hostname verification (e.g. with self-signed certificates)

timeout
Type:

integer

Required:

false

Default:

5

the timeout in seconds for the HTTP request to complete

headers
Type:

JSON map as string

Required:

false

Default:

{}

JSON map of HTTP header names and values to add to the request