MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / RequestFromContext

Function RequestFromContext

internal/httpapi/httpapi.go:395–400  ·  view source on GitHub ↗

RequestFromContext recovers the raw request stashed by withRawRequest.

(ctx context.Context)

Source from the content-addressed store, hash-verified

393
394// RequestFromContext recovers the raw request stashed by withRawRequest.
395func RequestFromContext(ctx context.Context) *http.Request {
396 if r, ok := ctx.Value(reqCtxKey{}).(*http.Request); ok {
397 return r
398 }
399 return nil
400}
401
402// requireUser authenticates the caller or returns a 401 envelope carrying
403// the machine-branchable "unauthorized" code.

Callers 2

requirePrincipalMethod · 0.85
rateLimitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected