(ctx context.Context, method, path string, body io.Reader)
| 213 | } |
| 214 | |
| 215 | func (c *Client) newRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) { |
| 216 | req, err := http.NewRequestWithContext(ctx, method, backendURL(path), body) |
| 217 | if err != nil { |
| 218 | return nil, err |
| 219 | } |
| 220 | req.Header.Set("User-Agent", userAgent) |
| 221 | return req, nil |
| 222 | } |
| 223 | |
| 224 | // backendURL generates a URL for the given API path. |
| 225 | // |
no test coverage detected