@cubejs-client/core 1.8.3 → 1.8.5

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.
@@ -2768,7 +2768,6 @@ var HttpTransport = /*#__PURE__*/function () {
2768
2768
  var requestMethod = (_ref4 = method !== null && method !== void 0 ? method : this.method) !== null && _ref4 !== void 0 ? _ref4 : url.length < 2000 ? 'GET' : 'POST';
2769
2769
  if (requestMethod === 'POST') {
2770
2770
  url = "".concat(this.apiUrl, "/").concat(apiMethod);
2771
- this.headers['Content-Type'] = 'application/json';
2772
2771
  }
2773
2772
  var effectiveFetchTimeout = fetchTimeout !== null && fetchTimeout !== void 0 ? fetchTimeout : this.fetchTimeout;
2774
2773
  var actualSignal = signal || this.signal || (effectiveFetchTimeout ? AbortSignal.timeout(effectiveFetchTimeout) : undefined);
@@ -2778,10 +2777,12 @@ var HttpTransport = /*#__PURE__*/function () {
2778
2777
  var runRequest = function runRequest() {
2779
2778
  return fetch(url, {
2780
2779
  method: requestMethod,
2781
- headers: _objectSpread2({
2780
+ headers: _objectSpread2(_objectSpread2({
2782
2781
  Authorization: _this.authorization,
2783
2782
  'x-request-id': baseRequestId && "".concat(baseRequestId, "-span-").concat(spanCounter++)
2784
- }, _this.headers),
2783
+ }, _this.headers), requestMethod === 'POST' ? {
2784
+ 'Content-Type': 'application/json'
2785
+ } : {}),
2785
2786
  credentials: _this.credentials,
2786
2787
  body: requestMethod === 'POST' ? JSON.stringify(params) : null,
2787
2788
  signal: actualSignal
@@ -2852,7 +2853,6 @@ var HttpTransport = /*#__PURE__*/function () {
2852
2853
  var requestMethod = (_ref6 = method !== null && method !== void 0 ? method : this.method) !== null && _ref6 !== void 0 ? _ref6 : 'POST';
2853
2854
  if (requestMethod === 'POST') {
2854
2855
  url = "".concat(this.apiUrl, "/").concat(apiMethod);
2855
- this.headers['Content-Type'] = 'application/json';
2856
2856
  }
2857
2857
  var effectiveFetchTimeout = fetchTimeout !== null && fetchTimeout !== void 0 ? fetchTimeout : this.fetchTimeout;
2858
2858
  var controller;
@@ -2875,10 +2875,12 @@ var HttpTransport = /*#__PURE__*/function () {
2875
2875
  _context2.n = 1;
2876
2876
  return fetch(url, {
2877
2877
  method: requestMethod,
2878
- headers: _objectSpread2({
2878
+ headers: _objectSpread2(_objectSpread2({
2879
2879
  Authorization: _this3.authorization,
2880
2880
  'x-request-id': baseRequestId || 'stream-request'
2881
- }, _this3.headers),
2881
+ }, _this3.headers), requestMethod === 'POST' ? {
2882
+ 'Content-Type': 'application/json'
2883
+ } : {}),
2882
2884
  credentials: _this3.credentials,
2883
2885
  body: requestMethod === 'POST' ? JSON.stringify(params || {}) : null,
2884
2886
  signal: actualSignal