httpcapture

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseRecorder

type ResponseRecorder struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

ResponseRecorder records response metadata for later inspection.

func NewResponseRecorder

func NewResponseRecorder(w http.ResponseWriter) *ResponseRecorder

NewResponseRecorder wraps a response writer with status/body capture.

func (*ResponseRecorder) BodyBytes

func (w *ResponseRecorder) BodyBytes() []byte

BodyBytes returns the buffered prefix of the response body.

func (*ResponseRecorder) StatusCode

func (w *ResponseRecorder) StatusCode() int

StatusCode returns the written status code, defaulting to 200 when none was set explicitly.

func (*ResponseRecorder) Write

func (w *ResponseRecorder) Write(p []byte) (int, error)

func (*ResponseRecorder) WriteHeader

func (w *ResponseRecorder) WriteHeader(status int)

Jump to

Keyboard shortcuts

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