diff --git a/api/api.go b/api/api.go index 0efb10bbb..0e96043b8 100644 --- a/api/api.go +++ b/api/api.go @@ -156,7 +156,7 @@ type Config struct { // TLSConfig is ignored if HttpClient is set. TLSConfig *TLSConfig - Headers http.Header + Header http.Header } // ClientConfig copies the configuration with a new client address, region, and @@ -676,7 +676,7 @@ func (c *Client) newRequest(method, path string) (*request, error) { } } - r.header = c.config.Headers + r.header = c.config.Header return r, nil } diff --git a/api/api_test.go b/api/api_test.go index 0048ecdfe..ccfc2b38e 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -344,7 +344,7 @@ func TestParseWriteMeta(t *testing.T) { func TestClientHeader(t *testing.T) { t.Parallel() c, s := makeClient(t, func(c *Config) { - c.Headers = http.Header{ + c.Header = http.Header{ "Hello": []string{"World"}, } }, nil)