Skip to content

Commit

Permalink
Add docs for BindHeaders
Browse files Browse the repository at this point in the history
  • Loading branch information
noseglid committed May 9, 2021
1 parent 962daf0 commit e30a353
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func (b *DefaultBinder) BindBody(c Context, i interface{}) (err error) {
return nil
}

// BindHeaders binds HTTP headers to a bindable object
func (b *DefaultBinder) BindHeaders(c Context, i interface{}) error {
if err := b.bindData(i, c.Request().Header, "header"); err != nil {
return NewHTTPError(http.StatusBadRequest, err.Error()).SetInternal(err)
Expand Down

0 comments on commit e30a353

Please sign in to comment.