MCPcopy Create free account
hub / github.com/imroc/req / GetContextData

Method GetContextData

request.go:998–1000  ·  view source on GitHub ↗

GetContextData returns the context data of specified key, which set by SetContextData.

(key any)

Source from the content-addressed store, hash-verified

996
997// GetContextData returns the context data of specified key, which set by SetContextData.
998func (r *Request) GetContextData(key any) any {
999 return r.Context().Value(key)
1000}
1001
1002// DisableAutoReadResponse disable read response body automatically (enabled by default).
1003func (r *Request) DisableAutoReadResponse() *Request {

Callers

nothing calls this directly

Calls 2

ContextMethod · 0.95
ValueMethod · 0.45

Tested by

no test coverage detected