// SetResponseHeader returns a ResponseFunc that sets the specified metadata
// key-value pair.
186341
func SetResponseHeader(key, val string) ServerResponseFunc {
	return func(ctx context.Context, md *metadata.MD, _ *metadata.MD) context.Context {
		key, val := EncodeKeyValue(key, val)
		(*md)[key] = append((*md)[key], val)
		return ctx
	}
}
1049455
func (s *IntegrationResponse) SetResponseTemplates(v map[string]*string) *IntegrationResponse {
	s.ResponseTemplates = v
	return s
}
1223915
func (auth *Auth) ResponseHeader(ext string) string {
	auth.Ext = ext
	if auth.ReqHash {
		auth.Hash = nil
	}

	h := `Hawk mac="` + base64.StdEncoding.EncodeToString(auth.mac(AuthResponse)) + `"`
	if auth.Ext != "" {
		h += `, ext="` + auth.Ext + `"`
	}
	if auth.Hash != nil {
		h += `, hash="` + base64.StdEncoding.EncodeToString(auth.Hash) + `"`
	}

	return h
}
866066
func SetRequestHeader(key, val string) RequestFunc {
	return func(ctx context.Context, r *http.Request) context.Context {
		r.Header.Set(key, val)
		return ctx
	}
}
91385
func (resp *Response) WriteHeader(defaultStatusCode int, defaultContentType string) {
	if resp.ContentType == "" {
		resp.ContentType = defaultContentType
	}
	resp.Out.internalHeader.Set("Content-Type", resp.ContentType)
	if resp.Status == 0 {
		resp.Status = defaultStatusCode
	}
	resp.SetStatus(resp.Status)
}
1177296
func (s *IntegrationResponse) SetResponseParameters(v map[string]*string) *IntegrationResponse {
	s.ResponseParameters = v
	return s
}
1183597
func (c *Call) WriteResponseHeader(k, v string) error {
	if c == nil {
		return yarpcerrors.InvalidArgumentErrorf(
			"failed to write response header: " +
				"Call was nil, make sure CallFromContext was called with a request context")
	}
	if c.ic.disableResponseHeaders {
		return yarpcerrors.InvalidArgumentErrorf("call does not support setting response headers")
	}
	c.ic.resHeaders = append(c.ic.resHeaders, keyValuePair{k: k, v: v})
	return nil
}
528867
func (a *auther) setRequestAuthHeader(req *http.Request, accessToken *Token) error {
	oauthParams := a.commonOAuthParams()
	oauthParams[oauthTokenParam] = accessToken.Token
	params, err := collectParameters(req, oauthParams)
	if err != nil {
		return err
	}
	signatureBase := signatureBase(req, params)
	signature, err := a.signer().Sign(accessToken.TokenSecret, signatureBase)
	if err != nil {
		return err
	}
	oauthParams[oauthSignatureParam] = signature
	req.Header.Set(authorizationHeaderParam, authHeaderValue(oauthParams))
	return nil
}
1356603
func (s *UpdateIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *UpdateIntegrationResponseOutput {
	s.ResponseTemplates = v
	return s
}
367122
func (s *PutRecordBatchOutput) SetRequestResponses(v []*PutRecordBatchResponseEntry) *PutRecordBatchOutput {
	s.RequestResponses = v
	return s
}
140168
func (t *StaticToken) SetAuthHeader(r *http.Request) {
	typ := t.Type
	if typ == "" {
		typ = "Bearer"
	}
	r.Header.Set("Authorization", typ+" "+t.Value)
}
728710
func (ctx *Context) AddHeader(key, value string) {
	ctx.Response.Header().Add(key, value)
}
807215
func (r *FastHttpHeader) Set(key string, value string) {
	if r.isResponse {
		r.Source.(*FastHttpResponse).Original.Response.Header.Set(key, value)
	}
}
572732
func (msg *Message) SetAddressHeader(field, address, name string) {
	msg.header[field] = []string{msg.FormatAddress(address, name)}
}
506530
func (s *BatchWriteOutput) SetResponses(v []*BatchWriteOperationResponse) *BatchWriteOutput {
	s.Responses = v
	return s
}
141289
func (s *GetEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *GetEmailChannelOutput {
	s.EmailChannelResponse = v
	return s
}
419744
func (s *CreateIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *CreateIntegrationResponseOutput {
	s.ResponseTemplates = v
	return s
}