makeRequest creates and executes a http.Request with the specified parameters, adding authentication and TLS options for the Docker client. The host name and schema is taken from the client or autodetected, and the path is relative to it, i.e. the path usually starts with /v2/.
(ctx context.Context, method, path string, headers map[string][]string, stream io.Reader, auth sendAuth, extraScope *authScope)
| 453 | // makeRequest creates and executes a http.Request with the specified parameters, adding authentication and TLS options for the Docker client. |
| 454 | // The host name and schema is taken from the client or autodetected, and the path is relative to it, i.e. the path usually starts with /v2/. |
| 455 | func (c *dockerClient) makeRequest(ctx context.Context, method, path string, headers map[string][]string, stream io.Reader, auth sendAuth, extraScope *authScope) (*http.Response, error) { |
| 456 | if err := c.detectProperties(ctx); err != nil { |
| 457 | return nil, err |
| 458 | } |
| 459 | |
| 460 | requestURL, err := c.resolveRequestURL(path) |
| 461 | if err != nil { |
| 462 | return nil, err |
| 463 | } |
| 464 | return c.makeRequestToResolvedURL(ctx, method, requestURL, headers, stream, -1, auth, extraScope) |
| 465 | } |
| 466 | |
| 467 | // resolveRequestURL turns a path for c.makeRequest into a full URL. |
| 468 | // Most users should call makeRequest directly, this exists basically to make the URL available for debug logs. |
no test coverage detected