MCPcopy
hub / github.com/esm-dev/esm.sh / Fetch

Method Fetch

internal/fetch/fetch.go:35–37  ·  view source on GitHub ↗

Fetch sends an HTTP GET request to the specified URL and returns the response.

(url *url.URL, header http.Header)

Source from the content-addressed store, hash-verified

33
34// Fetch sends an HTTP GET request to the specified URL and returns the response.
35func (c *FetchClient) Fetch(url *url.URL, header http.Header) (resp *http.Response, err error) {
36 return c.FetchWithContext(context.Background(), url, header)
37}
38
39// FetchWithContext sends an HTTP GET request with cancellation support.
40func (c *FetchClient) FetchWithContext(ctx context.Context, url *url.URL, header http.Header) (resp *http.Response, err error) {

Callers 4

customLandingPageFunction · 0.80
esmRouterFunction · 0.80
resolvePrPackageVersionFunction · 0.80
isSupportVersionRouteMethod · 0.80

Calls 1

FetchWithContextMethod · 0.95

Tested by

no test coverage detected