MCPcopy
hub / github.com/openai/openai-go / WithHeaderAdd

Function WithHeaderAdd

option/requestoption.go:122–127  ·  view source on GitHub ↗

WithHeaderAdd returns a RequestOption that adds the header value to the associated key. It appends onto any existing values.

(key, value string)

Source from the content-addressed store, hash-verified

120// WithHeaderAdd returns a RequestOption that adds the header value to the associated key. It appends
121// onto any existing values.
122func WithHeaderAdd(key, value string) RequestOption {
123 return requestconfig.RequestOptionFunc(func(r *requestconfig.RequestConfig) error {
124 r.AddHeader(key, value)
125 return nil
126 })
127}
128
129// WithHeaderDel returns a RequestOption that deletes the header value(s) associated with the given key.
130func WithHeaderDel(key string) RequestOption {

Callers

nothing calls this directly

Calls 2

RequestOptionFuncFuncType · 0.92
AddHeaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…