MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / fetchFunction

Function fetchFunction

app/core/Snaps/location/fetch.ts:41–52  ·  view source on GitHub ↗
(
  input: RequestInfo | URL,
)

Source from the content-addressed store, hash-verified

39type FetchFN = typeof fetch;
40
41export const fetchFunction: FetchFN = async (
42 input: RequestInfo | URL,
43): Promise<Response> => {
44 const { config } = RNFetchBlob;
45 const urlToFetch: string =
46 typeof input === 'string' ? input : input.toString();
47 const response: FetchBlobResponse = await config({ fileCache: true }).fetch(
48 'GET',
49 urlToFetch,
50 );
51 return await convertFetchBlobResponseToResponse(response);
52};
53///: END:ONLY_INCLUDE_IF

Callers 1

fetchNpmTarballFunction · 0.85

Calls 4

configInterface · 0.85
toStringMethod · 0.80
fetchMethod · 0.80

Tested by

no test coverage detected