MCPcopy
hub / github.com/labstack/echo / BindHeaders

Function BindHeaders

bind.go:114–119  ·  view source on GitHub ↗

BindHeaders binds HTTP headers to a bindable object

(c *Context, target any)

Source from the content-addressed store, hash-verified

112
113// BindHeaders binds HTTP headers to a bindable object
114func BindHeaders(c *Context, target any) error {
115 if err := bindData(target, c.Request().Header, "header", nil); err != nil {
116 return ErrBadRequest.Wrap(err)
117 }
118 return nil
119}
120
121// Bind implements the `Binder#Bind` function.
122// Binding is done in following order: 1) path params; 2) query params; 3) request body. Each step COULD override previous

Callers 2

TestBindHeaderParamFunction · 0.85

Calls 3

bindDataFunction · 0.85
RequestMethod · 0.80
WrapMethod · 0.45

Tested by 2

TestBindHeaderParamFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…