glitch-javascript-sdk 1.4.7 → 1.4.8
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/dist/cjs/index.js +3 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -6
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/util/Requests.ts +11 -13
package/dist/cjs/index.js
CHANGED
|
@@ -18651,15 +18651,12 @@ var Requests = /** @class */ (function () {
|
|
|
18651
18651
|
formData.append(key, data[key]);
|
|
18652
18652
|
}
|
|
18653
18653
|
// Prepare headers
|
|
18654
|
-
var headers = {
|
|
18655
|
-
'Content-Type': 'multipart/form-data',
|
|
18656
|
-
};
|
|
18654
|
+
var headers = {};
|
|
18657
18655
|
if (Requests.authToken) {
|
|
18658
18656
|
headers['Authorization'] = "Bearer ".concat(Requests.authToken);
|
|
18659
18657
|
}
|
|
18660
|
-
// Format URL
|
|
18661
|
-
|
|
18662
|
-
var uri = "".concat(Requests.baseUrl).concat(url).replace(/\/\//g, '/');
|
|
18658
|
+
// Format URL correctly
|
|
18659
|
+
var uri = Requests.baseUrl.replace(/\/+$/, '') + '/' + url.replace(/^\/+/, '');
|
|
18663
18660
|
// Make the request
|
|
18664
18661
|
return axios$1({
|
|
18665
18662
|
method: 'POST',
|