MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / request

Function request

apps/site/scripts/release-post/index.mjs:81–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79const __dirname = getRelativePath(import.meta.url);
80
81const request = options => {
82 return fetch(options.url, options).then(resp => {
83 if (resp.status !== 200) {
84 throw ERRORS.INVALID_STATUS_CODE(options.url, resp.status);
85 }
86
87 return options.json ? resp.json() : resp.text();
88 });
89};
90
91const explicitVersion = version =>
92 new Promise((resolve, reject) =>

Callers 5

findLatestVersionFunction · 0.85
fetchAuthorFunction · 0.85
fetchChangelogFunction · 0.85
fetchShasumsFunction · 0.85
urlOrComingSoonFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected