// Headers set specified HTTP headers
778041
func Headers(headers map[string]string) ConnectOption {
	return func(c *httpclient.HttpClient) {
		c.Headers = headers
	}
}
296674
func addHeaders(req *http.Request, header http.Header) {
	for key, values := range header {
		for _, value := range values {
			req.Header.Add(key, value)
		}
	}
}
677891
func (r *Router) Headers(pairs ...string) *Route {
	return r.getOrCreateRoute(r.mux.Headers(pairs...), "")
}
50172
func (c *ResetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
744167
func (c *ServerPermissionsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
919625
func (c *FixBuildsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
1294779
func (c *Client) Headers(method, url, timestamp, data string) (map[string]string, error) {
	h := make(map[string]string)
	h["CB-ACCESS-KEY"] = c.Key
	h["CB-ACCESS-PASSPHRASE"] = c.Passphrase
	h["CB-ACCESS-TIMESTAMP"] = timestamp

	message := fmt.Sprintf(
		"%s%s%s%s",
		timestamp,
		method,
		url,
		data,
	)

	sig, err := generateSig(message, c.Secret)
	if err != nil {
		return nil, err
	}
	h["CB-ACCESS-SIGN"] = sig
	return h, nil
}
327891
func (c *BotsDimensionsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
173961
func (c *Core) UIHeaders() (http.Header, error) {
	return c.uiConfig.Headers(context.Background())
}
2836
func (c *Connection) parseHeaders(resp *http.Response, errorMap errorMap) error {
	if errorMap != nil {
		if err, ok := errorMap[resp.StatusCode]; ok {
			drainAndClose(resp.Body, nil)
			return err
		}
	}
	if resp.StatusCode < 200 || resp.StatusCode > 299 {
		drainAndClose(resp.Body, nil)
		return newErrorf(resp.StatusCode, "HTTP Error: %d: %s", resp.StatusCode, resp.Status)
	}
	return nil
}
1070693
func (c *Client) GetHTTPHeaders(ctx context.Context) (map[string]string, error) {
	var headers map[string]string

	req, err := c.NewRequest("GET", headersPath, nil, nil)
	if err != nil {
		return nil, err
	}

	if err := c.Do(ctx, req, &headers); err != nil {
		return nil, err
	}

	return headers, nil
}
1034571
func (s *TestInvokeAuthorizerInput) SetHeaders(v map[string]*string) *TestInvokeAuthorizerInput {
	s.Headers = v
	return s
}
1351073
func (r *Response) SetHeaders(headers map[string]string, unique bool) {
	for k, v := range headers {
		r.SetHeader(k, v, unique)
	}
}
68125
func headers(header http.Header) map[string]string {
	v := make(map[string]string)
	for k, values := range header {
		// Skip authorization headers
		if strings.EqualFold(k, "Authorization") || strings.EqualFold(k, "X-Registry-Config") || strings.EqualFold(k, "X-Registry-Auth") {
			continue
		}
		for _, val := range values {
			v[k] = val
		}
	}
	return v
}
833297
func Header(req *http.Request, key, val string) {
	req.Header.Set(key, val)
}
621991
func RemoveHeaders(names []string, headers http.Header) {
	for _, h := range names {
		headers.Del(h)
	}
}
257484
func (e AuthError) Headers() http.Header {
	return http.Header{
		"Content-Type":           []string{"text/plain; charset=utf-8"},
		"X-Content-Type-Options": []string{"nosniff"},
		"WWW-Authenticate":       []string{fmt.Sprintf(`Basic realm=%q`, e.Realm)},
	}
}