setHeaders sets the required headers for the API.
(req *http.Request)
| 1197 | |
| 1198 | // setHeaders sets the required headers for the API. |
| 1199 | func (a *API) setHeaders(req *http.Request) { |
| 1200 | req.Header.Set("Accept", "application/vnd.github.v3+json") |
| 1201 | } |
| 1202 | |
| 1203 | // withRetry takes a generic function that sends an http request and retries |
| 1204 | // only when the returned response has a >=500 status code. |
no test coverage detected