(req *http.Request)
| 114 | } |
| 115 | |
| 116 | func (c *apiClient) Do(req *http.Request) (*http.Response, error) { |
| 117 | req.Header.Set("X-Api-Key", c.apikey) |
| 118 | resp, err := c.Client.Do(req) |
| 119 | if err != nil { |
| 120 | return nil, err |
| 121 | } |
| 122 | return resp, checkResponse(resp) |
| 123 | } |
| 124 | |
| 125 | func (c *apiClient) Request(url, method string, r io.Reader) (*http.Response, error) { |
| 126 | request, err := http.NewRequest(method, c.Endpoint()+"rest/"+url, r) |