SetRoot sets the default RootURL. You can override this on a per call basis using the RootURL field in Opts.
(RootURL string)
| 70 | // SetRoot sets the default RootURL. You can override this on a per |
| 71 | // call basis using the RootURL field in Opts. |
| 72 | func (api *Client) SetRoot(RootURL string) *Client { |
| 73 | api.mu.Lock() |
| 74 | defer api.mu.Unlock() |
| 75 | api.rootURL = RootURL |
| 76 | return api |
| 77 | } |
| 78 | |
| 79 | // SetHeader sets a header for all requests |
| 80 | // Start the key with "*" for don't canonicalise |