http

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: AGPL-3.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 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

Jump to

Keyboard shortcuts

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