MCPcopy Index your code
hub / github.com/coder/coder / ExtractHTTPRoute

Function ExtractHTTPRoute

coderd/httpmw/httproute.go:22–25  ·  view source on GitHub ↗

ExtractHTTPRoute retrieves just the HTTP route pattern from context. Returns empty string if not set.

(ctx context.Context)

Source from the content-addressed store, hash-verified

20// ExtractHTTPRoute retrieves just the HTTP route pattern from context.
21// Returns empty string if not set.
22func ExtractHTTPRoute(ctx context.Context) string {
23 ri, _ := ctx.Value(httpRouteInfoKey{}).(httpRouteInfo)
24 return ri.Route
25}
26
27// ExtractHTTPMethod retrieves just the HTTP method from context.
28// Returns empty string if not set.

Callers 15

TestHTTPRouteFunction · 0.92
PingMethod · 0.92
PGLocksMethod · 0.92
DeleteOrganizationMethod · 0.92
AcquireChatsMethod · 0.92
AcquireLockMethod · 0.92
AcquireProvisionerJobMethod · 0.92
ActivityBumpWorkspaceMethod · 0.92
AllUserIDsMethod · 0.92
ArchiveChatByIDMethod · 0.92

Calls 1

ValueMethod · 0.45

Tested by 1

TestHTTPRouteFunction · 0.74