(url, method string, r io.Reader)
| 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) |
| 127 | if err != nil { |
| 128 | return nil, err |
| 129 | } |
| 130 | return c.Do(request) |
| 131 | } |
| 132 | |
| 133 | func (c *apiClient) RequestString(url, method, data string) (*http.Response, error) { |
| 134 | return c.Request(url, method, bytes.NewBufferString(data)) |
no test coverage detected