fix: HTTP headers

This commit is contained in:
March 7th 2022-12-14 18:50:22 +07:00
parent fa95e9bb4f
commit 46691ce796
2 changed files with 2 additions and 3 deletions

View File

@ -46,9 +46,7 @@ class APIRequest {
...this.client.options.http.headers, ...this.client.options.http.headers,
Accept: '*/*', Accept: '*/*',
'Accept-Language': 'en-US,en;q=0.9', 'Accept-Language': 'en-US,en;q=0.9',
'Cache-Control': 'no-cache', 'Sec-Ch-Ua': `"Not?A_Brand";v="8", "Chromium";v="${chromeVersion}", "Google Chrome";v="${chromeVersion}"`,
Pragma: 'no-cache',
'Sec-Ch-Ua': `"Google Chrome";v="${chromeVersion}", "Chromium";v="${chromeVersion}", "Not=A?Brand";v="8"`,
'Sec-Ch-Ua-Mobile': '?0', 'Sec-Ch-Ua-Mobile': '?0',
'Sec-Ch-Ua-Platform': '"Windows"', 'Sec-Ch-Ua-Platform': '"Windows"',
'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Dest': 'empty',

View File

@ -54,6 +54,7 @@ class HTTPError extends Error {
this.requestData = { this.requestData = {
json: request.options.data, json: request.options.data,
files: request.options.files ?? [], files: request.options.files ?? [],
headers: request.options.headers,
}; };
} }
} }