SetHeader adds a key value pair to the options. The key-value pair will be part of the HTTP POST request headers.
(key, value string)
| 63 | // key-value pair will be part of the HTTP POST request |
| 64 | // headers. |
| 65 | func (o *PromptObjectOptions) SetHeader(key, value string) { |
| 66 | if o.headers == nil { |
| 67 | o.headers = make(map[string]string) |
| 68 | } |
| 69 | o.headers[http.CanonicalHeaderKey(key)] = value |
| 70 | } |
| 71 | |
| 72 | // toQueryValues - Convert the reqParams in Options to query string parameters. |
| 73 | func (o *PromptObjectOptions) toQueryValues() url.Values { |