checkClient ensures that a Client is set. If none is set, it defaults to the package default client via C().
()
| 624 | |
| 625 | // checkClient ensures that a Client is set. If none is set, it defaults to the package default client via C(). |
| 626 | func (r *Request) checkClient() { |
| 627 | if r.client == nil { |
| 628 | r.SetClient(C()) |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | // Get sends a GET request to the given URL. |
| 633 | func (r *Request) Get(url string) (*Response, error) { |