WithQueryAdd returns a RequestOption that adds the query value to the associated key. It appends onto any existing values.
(key, value string)
| 148 | // WithQueryAdd returns a RequestOption that adds the query value to the associated key. It appends |
| 149 | // onto any existing values. |
| 150 | func WithQueryAdd(key, value string) RequestOption { |
| 151 | return requestconfig.RequestOptionFunc(func(r *requestconfig.RequestConfig) error { |
| 152 | query := r.Request.URL.Query() |
| 153 | query.Add(key, value) |
| 154 | r.Request.URL.RawQuery = query.Encode() |
| 155 | return nil |
| 156 | }) |
| 157 | } |
| 158 | |
| 159 | // WithQueryDel returns a RequestOption that deletes the query value(s) associated with the key. |
| 160 | func WithQueryDel(key string) RequestOption { |
no test coverage detected
searching dependent graphs…