http_request_check_status_headers

Checks status of an HTTP URL.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
methodMethod to call the URL (GET, POST, PUT, DELETE).

This parameter is required.
urlURL to query.

This parameter is required.
expected_statusExpected status code of the HTTP response.

This parameter is required.
headersHeaders to include in the HTTP request (as a string, without ').

This parameter is optional.

Outcome conditions

You need to replace ${url} with its actual canonified value.

  • ✅ Ok: http_request_check_status_headers_${url}_ok
    • ☑️ Already compliant: http_request_check_status_headers_${url}_kept
    • 🟨 Repaired: http_request_check_status_headers_${url}_repaired
  • ❌ Error: http_request_check_status_headers_${url}_error

Example

method: http_request_check_status_headers
params:
  expected_status: VALUE
  url: VALUE
  headers: OPTIONAL_VALUE
  method: VALUE

Documentation

Perform a HTTP request on the URL, method and headers provided and check that the response has the expected status code (ie 200, 404, 503, etc)