Documentation
¶
Overview ¶
Package requeststate owns replayable request-body snapshots shared by validation stages.
Index ¶
- func AttachRoute(request *http.Request, route *router.Route) func()
- func Install(request *http.Request, body []byte)
- func Route(request *http.Request) *router.Route
- func Snapshot(request *http.Request) ([]byte, error)
- func WithFreshBody(request *http.Request, callback func() error) error
- func WithRoute(request *http.Request, route *router.Route) *http.Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachRoute ¶
AttachRoute scopes a resolved route to a request and returns an idempotent restoration function.
func Snapshot ¶
Snapshot reads a request body once and installs replay support while leaving it readable.
func WithFreshBody ¶
WithFreshBody gives a callback an independent reader and restores a fresh reader afterward.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.