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/esm/index.js CHANGED
@@ -5467,15 +5467,12 @@ var Requests = /** @class */ (function () {
5467
5467
  formData.append(key, data[key]);
5468
5468
  }
5469
5469
  // Prepare headers
5470
- var headers = {
5471
- 'Content-Type': 'multipart/form-data',
5472
- };
5470
+ var headers = {};
5473
5471
  if (Requests.authToken) {
5474
5472
  headers['Authorization'] = "Bearer ".concat(Requests.authToken);
5475
5473
  }
5476
- // Format URL
5477
- url = url.replace(/\/\//g, '/');
5478
- var uri = "".concat(Requests.baseUrl).concat(url).replace(/\/\//g, '/');
5474
+ // Format URL correctly
5475
+ var uri = Requests.baseUrl.replace(/\/+$/, '') + '/' + url.replace(/^\/+/, '');
5479
5476
  // Make the request
5480
5477
  return axios$1({
5481
5478
  method: 'POST',