Documentation
¶
Index ¶
- type ResponseRecorder
- func (r *ResponseRecorder) Append(other io.ReadCloser) error
- func (r *ResponseRecorder) Close() error
- func (r *ResponseRecorder) Header() fsthttp.Header
- func (r *ResponseRecorder) SetManualFramingMode(v bool)
- func (r *ResponseRecorder) Write(b []byte) (int, error)
- func (r *ResponseRecorder) WriteHeader(code int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseRecorder ¶
ResponseRecorder is an implementation of fsthttp.ResponseWriter that records its mutations for later inspection in tests.
func NewRecorder ¶
func NewRecorder() *ResponseRecorder
NewRecorder returns an initialized ResponseRecorder.
func (*ResponseRecorder) Append ¶
func (r *ResponseRecorder) Append(other io.ReadCloser) error
Append records the response body. The data is written to the Body field of the ResponseRecorder.
func (*ResponseRecorder) Close ¶
func (r *ResponseRecorder) Close() error
Close is a no-op on ResponseRecorder. It exists to satisfy the fsthttp.ResponseWriter interface.
func (*ResponseRecorder) Header ¶
func (r *ResponseRecorder) Header() fsthttp.Header
Header returns the response headers to mutate within a handler.
func (*ResponseRecorder) SetManualFramingMode ¶
func (r *ResponseRecorder) SetManualFramingMode(v bool)
SetManualFramingMode is a no-op on ResponseRecorder. It exists to satisfy the fsthttp.ResponseWriter interface.
func (*ResponseRecorder) Write ¶
func (r *ResponseRecorder) Write(b []byte) (int, error)
Write records the response body. The data is written to the Body field of the ResponseRecorder.
func (*ResponseRecorder) WriteHeader ¶
func (r *ResponseRecorder) WriteHeader(code int)
WriteHeader records the response code.