SetContext method sets the context.Context for current Request. It allows to interrupt the request execution if ctx.Done() channel is closed. See https://blog.golang.org/context article and the "context" package documentation. Attention: make sure call SetContext before EnableDumpXXX if you want to
(ctx context.Context)
| 981 | // Attention: make sure call SetContext before EnableDumpXXX if you want to |
| 982 | // dump at the request level. |
| 983 | func (r *Request) SetContext(ctx context.Context) *Request { |
| 984 | if ctx != nil { |
| 985 | r.ctx = ctx |
| 986 | } |
| 987 | return r |
| 988 | } |
| 989 | |
| 990 | // SetContextData sets the key-value pair data for current Request, so you |
| 991 | // can access some extra context info for current Request in hook or middleware. |
no outgoing calls