Param returns all values of the specified query parameter.
(key string)
| 459 | |
| 460 | // Param returns all values of the specified query parameter. |
| 461 | func (c *Client) Param(key string) []string { |
| 462 | c.mu.RLock() |
| 463 | defer c.mu.RUnlock() |
| 464 | |
| 465 | tmp := c.params.PeekMulti(key) |
| 466 | res := make([]string, 0, len(tmp)) |
| 467 | for _, v := range tmp { |
| 468 | res = append(res, utils.UnsafeString(v)) |
| 469 | } |
| 470 | |
| 471 | return res |
| 472 | } |
| 473 | |
| 474 | // AddParam adds a single query parameter and its value to the client. |
| 475 | // These params will be applied to all requests created from this client instance. |
no outgoing calls