HTTP

Steps

request

ParamDescription
urlWhich url do you want to request?
methodWhich HTTP method do you want to use?

statusCodeShouldBe

ParamDescription
statusCodeCheck status code from request

bodyShouldContain

ParamDescription
searchWhich term do you want to search for?

shouldRedirectTo

ParamDescription
urlWhich is the new location?

Example

name: http_basic_example
description: Test that example.com return HTTP 200
scrapeInterval: 1s
timeout: 1s
tags:
  sla: dev
scenario:
  kind: http
  steps:
    - type: addHTTPHeader
      params:
        key: Hidra-Token
        value: asd
    - type: request
      params:
        url: "https://example.org/?{{ .Now.Unix }}"
    - type: statusCodeShouldBe
      params:
        statusCode: "200"
    - type: bodyShouldContain
      params:
        search: example
    - type: bodyShouldContain
      params:
        search: aebfou3rfbro3b3oon
      negate: true

Last modified March 1, 2022: add missing changes (77e6d9c)