steamutils 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -0
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1113,6 +1113,13 @@ class SteamUser {
|
|
1113
1113
|
await sleep(60000)
|
1114
1114
|
result = await request(config)
|
1115
1115
|
}
|
1116
|
+
else if (result.status === 401) {
|
1117
|
+
console.log('Unauthorized')
|
1118
|
+
if (params.method.toUpperCase() === 'POST') {
|
1119
|
+
config.headers['Content-Type'] = 'multipart/form-data';
|
1120
|
+
result = await request(config)
|
1121
|
+
}
|
1122
|
+
}
|
1116
1123
|
if(result?.error?.code === 'ERR_FR_TOO_MANY_REDIRECTS') {
|
1117
1124
|
//Maximum number of redirects exceeded
|
1118
1125
|
plsLoginFirst = true
|
@@ -2332,6 +2339,9 @@ class SteamUser {
|
|
2332
2339
|
const {data} = await this._httpRequestAjax({
|
2333
2340
|
url: `${this.getMySteamUserProfileURL()}/ajaxclearaliashistory/`,
|
2334
2341
|
method: 'POST',
|
2342
|
+
headers: {
|
2343
|
+
'Content-Type':'multipart/form-data'
|
2344
|
+
}
|
2335
2345
|
})
|
2336
2346
|
return data
|
2337
2347
|
}
|
@@ -2572,6 +2582,9 @@ class SteamUser {
|
|
2572
2582
|
data: {
|
2573
2583
|
Privacy: JSON.stringify(privacyValue.PrivacySettings),
|
2574
2584
|
eCommentPermission: privacyValue.eCommentPermission
|
2585
|
+
},
|
2586
|
+
headers: {
|
2587
|
+
'Content-Type':'multipart/form-data'
|
2575
2588
|
}
|
2576
2589
|
})
|
2577
2590
|
|