MCPcopy Create free account
hub / github.com/containers/image / makeRequest

Method makeRequest

docker/docker_client.go:455–465  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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/.
455func (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.

Callers 15

fetchManifestMethod · 0.95
getBlobMethod · 0.95
CheckAuthFunction · 0.45
SearchRegistryFunction · 0.45
PutBlobWithOptionsMethod · 0.45
blobExistsMethod · 0.45
mountBlobMethod · 0.45
uploadManifestMethod · 0.45
GetBlobAtMethod · 0.45
deleteImageFunction · 0.45

Calls 3

detectPropertiesMethod · 0.95
resolveRequestURLMethod · 0.95

Tested by

no test coverage detected