Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureResponseWriter ¶
type CaptureResponseWriter struct {
http.ResponseWriter
// contains filtered or unexported fields
}
CaptureResponseWriter captures the response body to a byte slice
func NewCaptureResponseWriter ¶
func NewCaptureResponseWriter() *CaptureResponseWriter
NewCaptureResponseWriter returns a new CaptureResponseWriter
func (*CaptureResponseWriter) Body ¶
func (sw *CaptureResponseWriter) Body() []byte
Body returns the captured response body
func (*CaptureResponseWriter) Header ¶
func (sw *CaptureResponseWriter) Header() http.Header
Header returns the response header map
func (*CaptureResponseWriter) StatusCode ¶
func (sw *CaptureResponseWriter) StatusCode() int
StatusCode returns the captured status code
func (*CaptureResponseWriter) Write ¶
func (sw *CaptureResponseWriter) Write(b []byte) (int, error)
Write appends data to the response body
func (*CaptureResponseWriter) WriteHeader ¶
func (sw *CaptureResponseWriter) WriteHeader(code int)
WriteHeader sets the status code
Click to show internal directories.
Click to hide internal directories.