rest-client-sdk 7.6.0 → 7.6.1

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/index.cjs CHANGED
@@ -1063,7 +1063,11 @@
1063
1063
  var _this6 = this;
1064
1064
  var params = requestParams;
1065
1065
  var baseHeaders = {};
1066
- if (params.method !== 'GET' || params.method !== 'GET' && params.method !== 'DELETE') {
1066
+
1067
+ // a FormData body must let fetch set the Content-Type itself,
1068
+ // with the multipart/form-data boundary
1069
+ var isFormDataBody = FormData !== undefined && params.body instanceof FormData;
1070
+ if ((params.method !== 'GET' || params.method !== 'GET' && params.method !== 'DELETE') && !isFormDataBody) {
1067
1071
  baseHeaders = {
1068
1072
  'Content-Type': 'application/json'
1069
1073
  };