Add sensitive headers (#3429)

* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
This commit is contained in:
Antoine GIRARD 2018-01-30 23:09:16 +01:00 committed by Lauris BH
parent d09704e903
commit b3fd94c13d
2 changed files with 8 additions and 2 deletions

View file

@ -164,6 +164,12 @@ func (r *Request) Header(key, value string) *Request {
return r
}
// HeaderWithSensitiveCase add header item in request and keep the case of the header key.
func (r *Request) HeaderWithSensitiveCase(key, value string) *Request {
r.req.Header[key] = []string{value}
return r
}
// Headers returns headers in request.
func (r *Request) Headers() http.Header {
return r.req.Header