ExtractHTTPRoute retrieves just the HTTP route pattern from context. Returns empty string if not set.
(ctx context.Context)
| 20 | // ExtractHTTPRoute retrieves just the HTTP route pattern from context. |
| 21 | // Returns empty string if not set. |
| 22 | func 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. |