setHeaders sets the required headers for the API.
(req *http.Request)
| 1291 | |
| 1292 | // setHeaders sets the required headers for the API. |
| 1293 | func (a *API) setHeaders(req *http.Request) { |
| 1294 | req.Header.Set("Accept", "application/vnd.github.v3+json") |
| 1295 | } |
| 1296 | |
| 1297 | // withRetry takes a generic function that sends an http request and retries |
| 1298 | // only when the returned response has a >=500 status code. |
no test coverage detected