Skip to content

Commit ee93401

Browse files
authored
Add HeaderWithSensitiveCase methods to respect casing
1 parent 82a7b02 commit ee93401

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/httplib/httplib.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ func (r *Request) Header(key, value string) *Request {
164164
return r
165165
}
166166

167+
// HeaderWithSensitiveCase add header item string in request and keep the case of the header key.
168+
func (r *Request) HeaderWithSensitiveCase(key, value string) *Request {
169+
r.req.Header[key]=value
170+
return r
171+
}
172+
167173
// Headers returns headers in request.
168174
func (r *Request) Headers() http.Header {
169175
return r.req.Header

0 commit comments

Comments
 (0)