Built in node request - WORKING:
const requestUri = `REMOVED`;
const headers = {
"accept": "application/json, text/plain",
"accept-encoding": "gzip, deflate, br",
"cache-control": "no-cache",
"content-type": "application/json",
"expires": "Sat, 01 Jan 2000 00:00:00 GMT",
"pragma": "no-cache",
"User-Agent": Browser.userAgent,
"sec-ch-ua": Browser.userAgent,
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "Windows NT 10.0; Win64; x64",
"Referer": requestUri, // Note: A legitimate query would be the physical page and not the API URI
"Referrer-Policy": "strict-origin-when-cross-origin",
"cookie": `${Browser.cache.cookies.store.name}=${Browser.cache.cookies.store.value};`
};
const res = await fetch(requestUri, {
headers,
method: "GET"
});
GOT (HANGS, likely not sending headers):
const requestUri = `REMOVED`;
const headers = {
"accept": "application/json, text/plain",
"accept-encoding": "gzip, deflate, br",
"cache-control": "no-cache",
"content-type": "application/json",
"expires": "Sat, 01 Jan 2000 00:00:00 GMT",
"pragma": "no-cache",
"User-Agent": Browser.userAgent,
"sec-ch-ua": Browser.userAgent,
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "Windows NT 10.0; Win64; x64",
"Referer": requestUri, // Note: A legitimate query would be the physical page and not the API URI
"Referrer-Policy": "strict-origin-when-cross-origin",
"cookie": `${Browser.cache.cookies.store.name}=${Browser.cache.cookies.store.value};`
};
await got(requestUri, {headers});
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too