gohttp_mock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: MIT 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

	Error              error
	ResponseStatusCode int
	ResponseBody       string
	ResponseHeaders    http.Header
}

Mock structure provides a clean way to configure HTTP mocks based on the combination between 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