DoAPIRequestWithAuth sends an HTTP request to get an HTTP response similarly to DoWithAuth, but using the LFS API endpoint for the provided remote and operation to determine the access mode.
(remote string, req *http.Request)
| 54 | // to DoWithAuth, but using the LFS API endpoint for the provided remote and |
| 55 | // operation to determine the access mode. |
| 56 | func (c *Client) DoAPIRequestWithAuth(remote string, req *http.Request) (*http.Response, error) { |
| 57 | operation := getReqOperation(req) |
| 58 | apiEndpoint := c.Endpoints.Endpoint(operation, remote) |
| 59 | access := c.Endpoints.AccessFor(apiEndpoint.Url) |
| 60 | return c.DoWithAuth(remote, access, req) |
| 61 | } |
| 62 | |
| 63 | func (c *Client) doWithAuth(remote string, count *int, access creds.Access, req *http.Request, via []*http.Request) (*http.Response, error) { |
| 64 | if *count == defaultMaxAuthAttempts { |