mirror of
https://github.com/snobu/destreamer.git
synced 2026-02-11 17:19:42 +00:00
changed UserAgent version
added debug logging
This commit is contained in:
@@ -15,7 +15,7 @@ export class ApiClient {
|
|||||||
this.axiosInstance = axios.create({
|
this.axiosInstance = axios.create({
|
||||||
baseURL: session?.ApiGatewayUri,
|
baseURL: session?.ApiGatewayUri,
|
||||||
// timeout: 7000,
|
// timeout: 7000,
|
||||||
headers: { 'User-Agent': 'destreamer/2.0 (Hammer of Dawn)' }
|
headers: { 'User-Agent': 'destreamer/3.0 (beta)' }
|
||||||
});
|
});
|
||||||
|
|
||||||
axiosRetry(this.axiosInstance, {
|
axiosRetry(this.axiosInstance, {
|
||||||
@@ -86,6 +86,13 @@ export class ApiClient {
|
|||||||
'Authorization': 'Bearer ' + this.session?.AccessToken
|
'Authorization': 'Bearer ' + this.session?.AccessToken
|
||||||
};
|
};
|
||||||
|
|
||||||
|
logger.debug(
|
||||||
|
'url: ' + url + '\n' +
|
||||||
|
'method: ' + method + '\n' +
|
||||||
|
'payload: ' + payload + '\n' +
|
||||||
|
'responseType: ' + responseType + '\n'
|
||||||
|
);
|
||||||
|
|
||||||
return this.axiosInstance?.request({
|
return this.axiosInstance?.request({
|
||||||
method: method,
|
method: method,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
|
|||||||
Reference in New Issue
Block a user