Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder allows to create HTTP requests with a convenient API.
func NewTestBuilder ¶
NewTestBuilder returns a new Builder initialized with httptest.NewRequest
func (Builder) WithHeader ¶
WithHeader sets the header key to value
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader wraps an http.Request and provides helper functions to read from it.
func (Reader) MustJSON ¶
func (r Reader) MustJSON(v interface{})
JSON parses the request's body as JSON into v, or panics in case of error
func (Reader) MustString ¶
MustString returns the request's body as a string, or panics in case of error
Click to show internal directories.
Click to hide internal directories.