Revert "Headers -> Header"
This reverts commit 71396fa721945e55f51bc90ed02522936450209b.
This commit is contained in:
parent
c0264f68a4
commit
f54ef3843d
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue