Help us shape the future of Go! Take the 2026 Go Developer Survey

bodymutator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BodyMutator

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

func NewBodyMutator

func NewBodyMutator(bodyMutations *filterapi.HTTPBodyMutation, originalBody []byte) *BodyMutator

func (*BodyMutator) HasMutations added in v1.0.0

func (b *BodyMutator) HasMutations() bool

HasMutations reports whether this BodyMutator was constructed with a non-nil HTTPBodyMutation config. When false, Mutate is a no-op that returns its input unchanged, so callers can short-circuit the upstream filter's body-replacement path entirely.

func (*BodyMutator) Mutate

func (b *BodyMutator) Mutate(requestBody []byte) ([]byte, error)

Mutate mutates the request body based on the body mutations.

Jump to

Keyboard shortcuts

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