MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / fetchJSON

Function fetchJSON

src/modules/gmail.js:384–391  ·  view source on GitHub ↗
(resource, options)

Source from the content-addressed store, hash-verified

382}
383
384async function fetchJSON(resource, options) {
385 const response = await fetch(resource, options);
386 const json = await response.json();
387 if (!response.ok) {
388 throw new MvError(json.error_description ?? json.error?.message, 'GMAIL_API_ERROR');
389 }
390 return json;
391}
392
393function parseQuery(queryString, separator = '&') {
394 const query = {};

Callers 5

getMessageFunction · 0.85
getAttachmentFunction · 0.85
sendMessageFunction · 0.85
sendMessageMetaFunction · 0.85
getUserInfoFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected