MCPcopy
hub / github.com/gin-gonic/gin / ShouldBindHeader

Method ShouldBindHeader

context.go:903–905  ·  view source on GitHub ↗

ShouldBindHeader is a shortcut for c.ShouldBindWith(obj, binding.Header). It works like ShouldBindJSON but binds values from HTTP headers.

(obj any)

Source from the content-addressed store, hash-verified

901// ShouldBindHeader is a shortcut for c.ShouldBindWith(obj, binding.Header).
902// It works like ShouldBindJSON but binds values from HTTP headers.
903func (c *Context) ShouldBindHeader(obj any) error {
904 return c.ShouldBindWith(obj, binding.Header)
905}
906
907// ShouldBindUri binds the passed struct pointer using the specified binding engine.
908// It works like ShouldBindJSON but binds parameters from the URI.

Callers 1

Calls 1

ShouldBindWithMethod · 0.95

Tested by 1