handlertest

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpResult

type HttpResult struct {
	// contains filtered or unexported fields
}

func (*HttpResult) AssertJSON

func (r *HttpResult) AssertJSON(expected any) *HttpResult

func (*HttpResult) AssertJSONContains

func (r *HttpResult) AssertJSONContains(path string, expected any) *HttpResult

func (*HttpResult) AssertJSONString

func (r *HttpResult) AssertJSONString(jsonBody string) *HttpResult

func (*HttpResult) AssertStatus

func (r *HttpResult) AssertStatus(status int) *HttpResult

func (*HttpResult) AssertStatus2XX

func (r *HttpResult) AssertStatus2XX() *HttpResult

func (*HttpResult) AssertStatus3XX

func (r *HttpResult) AssertStatus3XX() *HttpResult

func (*HttpResult) AssertStatus4XX

func (r *HttpResult) AssertStatus4XX() *HttpResult

func (*HttpResult) AssertStatus5XX

func (r *HttpResult) AssertStatus5XX() *HttpResult

func (*HttpResult) AssertStatusOK

func (r *HttpResult) AssertStatusOK() *HttpResult

func (*HttpResult) AssertStatusRange

func (r *HttpResult) AssertStatusRange(min, max int) *HttpResult

func (*HttpResult) Body

func (r *HttpResult) Body() []byte

type RequestBuilder

type RequestBuilder struct {
	// contains filtered or unexported fields
}

func New

func (*RequestBuilder) Delete

func (rb *RequestBuilder) Delete(target string, body io.Reader) *HttpResult

func (*RequestBuilder) DeleteJSON

func (rb *RequestBuilder) DeleteJSON(target string, body any) *HttpResult

func (*RequestBuilder) Get

func (rb *RequestBuilder) Get(target string) *HttpResult

func (*RequestBuilder) GetJSON

func (rb *RequestBuilder) GetJSON(target string) *HttpResult

func (*RequestBuilder) Patch

func (rb *RequestBuilder) Patch(target string, body io.Reader) *HttpResult

func (*RequestBuilder) PatchJSON

func (rb *RequestBuilder) PatchJSON(target string, body any) *HttpResult

func (*RequestBuilder) Post

func (rb *RequestBuilder) Post(target string, body io.Reader) *HttpResult

func (*RequestBuilder) PostJSON

func (rb *RequestBuilder) PostJSON(target string, body any) *HttpResult

func (*RequestBuilder) Put

func (rb *RequestBuilder) Put(target string, body io.Reader) *HttpResult

func (*RequestBuilder) PutJSON

func (rb *RequestBuilder) PutJSON(target string, body any) *HttpResult

func (*RequestBuilder) WithHeader

func (rb *RequestBuilder) WithHeader(key, value string) *RequestBuilder

func (*RequestBuilder) WithJSONHeaders

func (rb *RequestBuilder) WithJSONHeaders() *RequestBuilder

Jump to

Keyboard shortcuts

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