BindHeaders binds HTTP headers to a bindable object
(c *Context, target any)
| 112 | |
| 113 | // BindHeaders binds HTTP headers to a bindable object |
| 114 | func 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 |
searching dependent graphs…