http

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package http reports on the success of an HTTP request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The method attribute defines the HTTP method to use for the request.
	Method string `hcl:"method,optional"`
	// The url attribute sets the URL of the request.
	URL string `hcl:"url"`
	// The headers attribute sets custom headers for the request.
	Headers map[string][]string `hcl:"headers,optional"`
	// The body attribute sets the request's body.
	Body string `hcl:"body,optional"`
	// The expected_status attribute sets the expected response status. It defaults to 200.
	ExpectedStatus int `hcl:"expected_status,optional"`
	// The search_string attribute will look for the provided string in the response body, and fail the probe if the text is not found.
	SearchString string `hcl:"search_string,optional"`
}

Config for the http probe: it sends HTTP requests and tests the response.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL