Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#210): Provide a method to return all headers (not only first header) of a given key #211

Merged
merged 7 commits into from Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/response.go
Expand Up @@ -39,6 +39,10 @@ func (r response) GetHeader(name string) string {
return r.resp.Header.Get(name)
}

func (r response) GetHeaders(name string) []string {
return r.resp.Header.Values(name)
}

func (r response) Body() io.ReadCloser {
return r.resp.Body
}
1 change: 1 addition & 0 deletions client_response.go
Expand Up @@ -27,6 +27,7 @@ type ClientResponse interface {
Code() int
Message() string
GetHeader(string) string
GetHeaders(string) string
germanhs marked this conversation as resolved.
Show resolved Hide resolved
Body() io.ReadCloser
}

Expand Down