MCPcopy Create free account
hub / github.com/kataras/iris / RecordRequestBody

Method RecordRequestBody

context/context.go:2663–2665  ·  view source on GitHub ↗

RecordRequestBody same as the Application's DisableBodyConsumptionOnUnmarshal configuration field but acts only for the current request. It makes the request body readable more than once.

(b bool)

Source from the content-addressed store, hash-verified

2661// configuration field but acts only for the current request.
2662// It makes the request body readable more than once.
2663func (ctx *Context) RecordRequestBody(b bool) {
2664 ctx.values.Set(disableRequestBodyConsumptionContextKey, b)
2665}
2666
2667// IsRecordingBody reports whether the request body can be readen multiple times.
2668func (ctx *Context) IsRecordingBody() bool {

Callers 2

HandlerMethod · 0.80
FromJSONFunction · 0.80

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected