MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / Request

Function Request

src/background/utils/url.js:12–21  ·  view source on GitHub ↗
({ url, vet, ...opts })

Source from the content-addressed store, hash-verified

10
11addOwnCommands({
12 async Request({ url, vet, ...opts }) {
13 const vettedUrl = vet ? vetUrl(url) : url;
14 const fn = isRemote(vettedUrl) && !isCdnUrlRe.test(vettedUrl)
15 ? requestLimited
16 : request;
17 const res = await fn(vettedUrl, opts);
18 return opts[kResponseType] === 'blob'
19 ? makeRaw(res)
20 : res.data; // TODO: if we ever need headers, send it as [...headers] to make it transferable
21 },
22});
23
24/**

Callers

nothing calls this directly

Calls 4

isRemoteFunction · 0.90
makeRawFunction · 0.90
vetUrlFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected