bodycapture

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package bodycapture contains the bounded response-body capture shared by ReqKey's framework adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capture

type Capture struct {
	// contains filtered or unexported fields
}

Capture keeps only enough bytes to reconstruct the first 1,000 UTF-8 characters of a response.

func New

func New(enabled bool) *Capture

New creates a bounded body capture.

func (*Capture) Add

func (c *Capture) Add(value []byte)

Add records a response chunk without retaining an unbounded stream.

func (*Capture) Text

func (c *Capture) Text(headers http.Header) (string, bool)

Text returns a privacy-bounded body when the response media type is textual and the content is not compressed.

Jump to

Keyboard shortcuts

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