Skip to content

Commit

Permalink
refactor(go-resty#432): Update The Method To SetHeaderMultiValues
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Ilham committed Sep 12, 2021
1 parent a22f51a commit c86aa8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion request.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (r *Request) SetHeaders(headers map[string]string) *Request {
// "Accept": []string{"text/html", "application/xhtml+xml", "application/xml;q=0.9", "image/webp", "*/*;q=0.8"},
// })
// Also you can override header value, which was set at client instance level.
func (r *Request) SetMultiValueHeaders(headers map[string][]string) *Request {
func (r *Request) SetHeaderMultiValues(headers map[string][]string) *Request {
for key, values := range headers {
r.SetHeader(key, strings.Join(values, ", "))
}
Expand Down
2 changes: 1 addition & 1 deletion request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ func TestSetHeaderMultipleValue(t *testing.T) {
defer ts.Close()

r := dclr().
SetMultiValueHeaders(map[string][]string{
SetHeaderMultiValues(map[string][]string{
"Content": []string{"text/*", "text/html", "*"},
"Authorization": []string{"Bearer xyz"},
})
Expand Down

0 comments on commit c86aa8f

Please sign in to comment.