Merge pull request #42694 from thaJeztah/client_remove_CustomHTTPHeaders

client: remove deprecated SetCustomHTTPHeaders(), CustomHTTPHeaders()
This commit is contained in:
Tianon Gravi 2021-08-23 09:35:53 -07:00 committed by GitHub
commit 88bd93fa60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,21 +281,6 @@ func ParseHostURL(host string) (*url.URL, error) {
}, nil
}
// CustomHTTPHeaders returns the custom http headers stored by the client.
func (cli *Client) CustomHTTPHeaders() map[string]string {
m := make(map[string]string)
for k, v := range cli.customHTTPHeaders {
m[k] = v
}
return m
}
// SetCustomHTTPHeaders that will be set on every HTTP request made by the client.
// Deprecated: use WithHTTPHeaders when creating the client.
func (cli *Client) SetCustomHTTPHeaders(headers map[string]string) {
cli.customHTTPHeaders = headers
}
// Dialer returns a dialer for a raw stream connection, with HTTP/1.1 header, that can be used for proxying the daemon connection.
// Used by `docker dial-stdio` (docker/cli#889).
func (cli *Client) Dialer() func(context.Context) (net.Conn, error) {