gohttp_mock

package
v0.0.0-...-9e14e44 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MockupServer = mockServer{
		// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Mock

type Mock struct {
	Method      string
	URL         string
	RequestBody string

	ResponseStatusCode int
	ResponseBody       string
	Error              error
}

Mock provides a clean way to configure http mocks based on a combination of a Request Method, URL, and Request Body.

func (*Mock) GetResponse

func (m *Mock) GetResponse() (*core.Response, error)

GetResponse returns a Response object based on the Mock configuration.

Jump to

Keyboard shortcuts

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