Documentation ¶
Index ¶
- func ExtractJSON[T any](resp *httptest.ResponseRecorder) *T
- func ToJSON[T any](v T) ([]byte, error)
- func ToPlain[T Stringer](v T) []byte
- func ToXML[T any](v T) ([]byte, error)
- type Engine
- type Request
- func (r *Request) AddHeader(key, value string) *Request
- func (r *Request) AddQuery(key, value string) *Request
- func (r *Request) Clone() *Request
- func (r *Request) DELETE() *Request
- func (r *Request) GET() *Request
- func (r *Request) JSON(body any) *Request
- func (r *Request) PATCH() *Request
- func (r *Request) POST() *Request
- func (r *Request) PUT() *Request
- func (r *Request) Send(engine http.Handler) *httptest.ResponseRecorder
- func (r *Request) SetBody(body any) *Request
- type Stringer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractJSON ¶
func ExtractJSON[T any](resp *httptest.ResponseRecorder) *T
ExtractJSON extracts the JSON response body into a struct pointer.
Types ¶
Click to show internal directories.
Click to hide internal directories.