RespHeader binds the response header strings into the struct, map[string]string and map[string][]string. Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).
(out any)
| 254 | // RespHeader binds the response header strings into the struct, map[string]string and map[string][]string. |
| 255 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
| 256 | func (b *Bind) RespHeader(out any) error { |
| 257 | bind := binder.GetFromThePool[*binder.RespHeaderBinding](&binder.RespHeaderBinderPool) |
| 258 | bind.EnableSplitting = b.ctx.App().config.EnableSplittingOnParsers |
| 259 | |
| 260 | defer releasePooledBinder(&binder.RespHeaderBinderPool, bind) |
| 261 | |
| 262 | if err := b.returnBindErr(bind.Bind(b.ctx.Response(), out), BindSourceRespHeader); err != nil { |
| 263 | return err |
| 264 | } |
| 265 | |
| 266 | return b.validateStruct(out) |
| 267 | } |
| 268 | |
| 269 | // Cookie binds the request cookie strings into the struct, map[string]string and map[string][]string. |
| 270 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |