MCPcopy
hub / github.com/docker/compose / newRequest

Method newRequest

internal/desktop/client.go:215–222  ·  view source on GitHub ↗
(ctx context.Context, method, path string, body io.Reader)

Source from the content-addressed store, hash-verified

213}
214
215func (c *Client) newRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
216 req, err := http.NewRequestWithContext(ctx, method, backendURL(path), body)
217 if err != nil {
218 return nil, err
219 }
220 req.Header.Set("User-Agent", userAgent)
221 return req, nil
222}
223
224// backendURL generates a URL for the given API path.
225//

Callers 2

PingMethod · 0.95
FeatureFlagsMethod · 0.95

Calls 1

backendURLFunction · 0.85

Tested by

no test coverage detected