MCPcopy
hub / github.com/danielgtaylor/huma / UseMiddleware

Method UseMiddleware

api.go:288–288  ·  view source on GitHub ↗

UseMiddleware appends a middleware handler to the API middleware stack. The middleware stack for any API will execute before searching for a matching route to a specific handler, which provides opportunity to respond early, change the course of the request execution, or set request-scoped values fo

(middlewares ...func(ctx Context, next func(Context)))

Source from the content-addressed store, hash-verified

286 // change the course of the request execution, or set request-scoped values for
287 // the next Middleware.
288 UseMiddleware(middlewares ...func(ctx Context, next func(Context)))
289
290 // Middlewares returns a slice of middleware handler functions that will be
291 // run for all operations. Middleware are run in the order they are added.

Callers 5

TestContextValueFunction · 0.65
TestFeaturesFunction · 0.65
TestAdaptersFunction · 0.65
TestHumaFiberV2Function · 0.65
TestHumaFiberFunction · 0.65

Implementers 1

apiapi.go

Calls

no outgoing calls

Tested by 5

TestContextValueFunction · 0.52
TestFeaturesFunction · 0.52
TestAdaptersFunction · 0.52
TestHumaFiberV2Function · 0.52
TestHumaFiberFunction · 0.52