Revert "Headers -> Header"

This reverts commit 71396fa721945e55f51bc90ed02522936450209b.
This commit is contained in:
Conor Mongey 2021-01-06 01:39:18 +00:00
parent c0264f68a4
commit f54ef3843d
No known key found for this signature in database
GPG Key ID: 5C886ACC44EB17C0
3 changed files with 7 additions and 7 deletions

View File

@ -156,7 +156,7 @@ type Config struct {
// TLSConfig is ignored if HttpClient is set.
TLSConfig *TLSConfig
Header http.Header
Headers http.Header
}
// ClientConfig copies the configuration with a new client address, region, and
@ -677,8 +677,8 @@ func (c *Client) newRequest(method, path string) (*request, error) {
}
}
if c.config.Header != nil {
r.header = c.config.Header
if c.config.Headers != nil {
r.header = c.config.Headers
}
return r, nil

View File

@ -344,7 +344,7 @@ func TestParseWriteMeta(t *testing.T) {
func TestClientHeader(t *testing.T) {
t.Parallel()
c, s := makeClient(t, func(c *Config) {
c.Header = http.Header{
c.Headers = http.Header{
"Hello": []string{"World"},
}
}, nil)

View File

@ -156,7 +156,7 @@ type Config struct {
// TLSConfig is ignored if HttpClient is set.
TLSConfig *TLSConfig
Header http.Header
Headers http.Header
}
// ClientConfig copies the configuration with a new client address, region, and
@ -677,8 +677,8 @@ func (c *Client) newRequest(method, path string) (*request, error) {
}
}
if c.config.Header != nil {
r.header = c.config.Header
if c.config.Headers != nil {
r.header = c.config.Headers
}
return r, nil