http

package
v0.0.0-...-506879c Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultVerifier

func NewDefaultVerifier() *defaultVerifier

func ResponseBodyMatches

func ResponseBodyMatches(expectedBody []byte) *responseBodyMatches

ResponseBodyMatches asserts HTTP response body matches.

func ResponseCodeMatches

func ResponseCodeMatches(expectedResponseCode int) *responseCodeMatches

ResponseCodeMatches asserts HTTP response code matches

Types

type Matcher

type Matcher interface {
	Matches(resp Response) error
}

Matcher tests against specific HTTP behavior.

type Response

type Response struct {
	Body         []byte
	ResponseCode int
}

type Verifier

type Verifier interface {
	VerifyURL(url string, matchers ...Matcher) error
}

Verifier is responsible for verify the behavior of an HTTP endpoint.

Jump to

Keyboard shortcuts

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