MCPcopy Create free account
hub / github.com/chain/Core / Request

Function Request

net/http/httpjson/context.go:25–27  ·  view source on GitHub ↗

Request returns the HTTP request stored in ctx. If there is none, it panics. The context given to a handler function registered in this package is guaranteed to have a request.

(ctx context.Context)

Source from the content-addressed store, hash-verified

23// registered in this package is guaranteed to have
24// a request.
25func Request(ctx context.Context) *http.Request {
26 return ctx.Value(reqKey).(*http.Request)
27}
28
29// ResponseWriter returns the HTTP response writer stored in ctx.
30// If there is none, it panics.

Callers 1

TestContextFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by 1

TestContextFunction · 0.68