MCPcopy
hub / github.com/appium/appium / request

Function request

test/jsonwp-proxy/mock-request.js:23–35  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

21}
22
23async function request (opts) { // eslint-disable-line require-await
24 const {url, method, json} = opts;
25 if (/badurl$/.test(url)) {
26 throw new Error('noworky');
27 }
28
29 const [status, data] = resFixture(url, method, json);
30 return {
31 status,
32 headers: {'content-type': 'application/json; charset=utf-8'},
33 data,
34 };
35}
36
37export default request;

Callers 1

mockProxyFunction · 0.85

Calls 1

resFixtureFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…