// AddRequestHeader set the authorization header to use Akamai OPEN API
//
// Deprecated: use github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid
969971
func (c Config) AddRequestHeader(req *http.Request) *http.Request {
	if c.Debug {
		log.SetLevel(log.DebugLevel)
	}
	timestamp := makeEdgeTimeStamp()
	nonce := createNonce()

	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("Authorization", c.createAuthHeader(req, timestamp, nonce))
	return req
}
962249
func (c *AdminListUsersCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
98168
func (h Headers) AddHeaders(o Headers) Headers {
	r := append(h, o...)
	return r
}
775510
func (c *AdminGetUserCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
492680
func AddAuthHeaders(ctx context.Context, r *http.Request, serviceToken string) {
	if IsUserPresent(ctx) {
		AddUserHeader(r, User(ctx))
	}
	AddServiceTokenHeader(r, serviceToken)
}
193929
func (r Request) AddHeader(key string, value string) Request {
	r.Headers = append(r.Headers, Header{Key: key, Value: value})
	return r
}
1245042
func (a *auther) setRequestTokenAuthHeader(req *http.Request) error {
	oauthParams := a.commonOAuthParams()
	oauthParams[oauthCallbackParam] = a.config.CallbackURL
	params, err := collectParameters(req, oauthParams)
	if err != nil {
		return err
	}
	signatureBase := signatureBase(req, params)
	signature, err := a.signer().Sign("", signatureBase)
	if err != nil {
		return err
	}
	oauthParams[oauthSignatureParam] = signature
	if a.config.Realm != "" {
		oauthParams[realmParam] = a.config.Realm
	}
	req.Header.Set(authorizationHeaderParam, authHeaderValue(oauthParams))
	return nil
}
369691
func AddRequestHeader(c Config, req *http.Request) *http.Request {
	return c.AddRequestHeader(req)
}
1140904
func SetResponseHeader(resp *http.Response, h string, v string) {
	if resp.Header == nil {
		resp.Header = make(http.Header)
	}
	resp.Header.Set(h, v)
}
1027739
func (m *Message) AddHeader(header, value string) {
	if m.headers == nil {
		m.headers = make(map[string]string)
	}
	m.headers[header] = value
}
945434
func AddDeprecatedHeader(r *http.Request, token string) {
	if len(token) > 0 {
		r.Header.Add(DeprecatedAuthHeader, token)
	}
}
127736
func AddHeader(key, value string) Middleware {
	return func(h http.Handler) http.Handler {
		return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
			addHeaderIfNotExists(w.Header(), key, value)
			h.ServeHTTP(w, r)
		})
	}
}
728710
func (ctx *Context) AddHeader(key, value string) {
	ctx.Response.Header().Add(key, value)
}
487493
func (c *FinalizeGsUploadCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
388457
func (ba *BasicAuth) AddAuthHeaders(req *http.Request) {
	authString := []byte(ba.Username + ":" + ba.Password)
	header := "Basic " + base64.StdEncoding.EncodeToString(authString)
	req.Header.Set("Authorization", string(header))
}
490699
func (r *RequestConfig) Header(name, value string) *RequestConfig {
	r.HeaderMap.Add(name, value)
	return r
}
572499
func (o Options) addHeaders(headers http.Header) {
	if len(o.ServerSideEncryptionKeyID) != 0 {
		headers.Set("x-oss-server-side-encryption", "KMS")
		headers.Set("x-oss-server-side-encryption-key-id", o.ServerSideEncryptionKeyID)
	} else if o.ServerSideEncryption {
		headers.Set("x-oss-server-side-encryption", "AES256")
	}
	if len(o.ContentEncoding) != 0 {
		headers.Set("Content-Encoding", o.ContentEncoding)
	}
	if len(o.CacheControl) != 0 {
		headers.Set("Cache-Control", o.CacheControl)
	}
	if len(o.ContentMD5) != 0 {
		headers.Set("Content-MD5", o.ContentMD5)
	}
	if len(o.ContentDisposition) != 0 {
		headers.Set("Content-Disposition", o.ContentDisposition)
	}

	for k, v := range o.Meta {
		for _, mv := range v {
			headers.Add("x-oss-meta-"+k, mv)
		}
	}
}