Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BodyCaptureWriter ¶
type BodyCaptureWriter struct {
gin.ResponseWriter
Body *bytes.Buffer
}
BodyCaptureWriter is a gin.ResponseWriter that captures the response body while allowing it to be written to the client
func NewBodyCaptureWriter ¶
func NewBodyCaptureWriter(c *gin.Context) *BodyCaptureWriter
NewBodyCaptureWriter creates a new BodyCaptureWriter
func (*BodyCaptureWriter) GetBody ¶
func (w *BodyCaptureWriter) GetBody() string
GetBody returns the captured response body as a string
func (*BodyCaptureWriter) Write ¶
func (w *BodyCaptureWriter) Write(b []byte) (int, error)
Write captures the response body and forwards it to the underlying ResponseWriter
func (*BodyCaptureWriter) WriteString ¶
func (w *BodyCaptureWriter) WriteString(s string) (int, error)
WriteString captures the string response and forwards it to the underlying ResponseWriter
Click to show internal directories.
Click to hide internal directories.