View definition

(*RequestCtx).SetUserValue

Defined in github.com/valyala/fasthttp/server.go

Description

SetUserValue stores the given value (arbitrary object) under the given key in ctx.

The value stored in ctx may be obtained by UserValue*.

This functionality may be useful for passing arbitrary values between functions involved in request processing.

All the values are removed from ctx after returning from the top RequestHandler. Additionally, Close method is called on each value implementing io.Closer before removing the value from ctx.

SetUserValue is referenced in 3 repositories

github.com/valyala/fasthttp github.com/headwindfly/clevergo github.com/kataras/iris