(method, path string, body io.Reader, configure func(*http.Request))
| 261 | } |
| 262 | |
| 263 | func (c *simpleClient) performRequest(method, path string, body io.Reader, configure func(*http.Request)) (*simpleResponse, error) { |
| 264 | if path == "graphql" { |
| 265 | // FIXME: This dirty workaround cancels out the "v3" portion of the |
| 266 | // "/api/v3" prefix used for Enterprise. Find a better place for this. |
| 267 | path = "../graphql" |
| 268 | } |
| 269 | url, err := url.Parse(path) |
| 270 | if err == nil { |
| 271 | url = c.rootUrl.ResolveReference(url) |
| 272 | return c.performRequestUrl(method, url, body, configure) |
| 273 | } else { |
| 274 | return nil, err |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | func (c *simpleClient) performRequestUrl(method string, url *url.URL, body io.Reader, configure func(*http.Request)) (res *simpleResponse, err error) { |
| 279 | req, err := http.NewRequest(method, url.String(), body) |
no test coverage detected