@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.
- package/dist/cubejs-client-core.cjs +8 -6
- package/dist/cubejs-client-core.cjs.map +1 -1
- package/dist/cubejs-client-core.umd.js +8 -6
- package/dist/cubejs-client-core.umd.js.map +1 -1
- package/dist/src/HttpTransport.js +2 -2
- package/dist/src/streaming.d.ts.map +1 -1
- package/dist/src/streaming.js +4 -2
- package/dist/test/HttpTransport.test.js +15 -1
- package/package.json +3 -3
|
@@ -2717,7 +2717,6 @@
|
|
|
2717
2717
|
var requestMethod = (_ref4 = method !== null && method !== void 0 ? method : this.method) !== null && _ref4 !== void 0 ? _ref4 : url.length < 2000 ? 'GET' : 'POST';
|
|
2718
2718
|
if (requestMethod === 'POST') {
|
|
2719
2719
|
url = "".concat(this.apiUrl, "/").concat(apiMethod);
|
|
2720
|
-
this.headers['Content-Type'] = 'application/json';
|
|
2721
2720
|
}
|
|
2722
2721
|
var effectiveFetchTimeout = fetchTimeout !== null && fetchTimeout !== void 0 ? fetchTimeout : this.fetchTimeout;
|
|
2723
2722
|
var actualSignal = signal || this.signal || (effectiveFetchTimeout ? AbortSignal.timeout(effectiveFetchTimeout) : undefined);
|
|
@@ -2727,10 +2726,12 @@
|
|
|
2727
2726
|
var runRequest = function runRequest() {
|
|
2728
2727
|
return fetch(url, {
|
|
2729
2728
|
method: requestMethod,
|
|
2730
|
-
headers: _objectSpread2({
|
|
2729
|
+
headers: _objectSpread2(_objectSpread2({
|
|
2731
2730
|
Authorization: _this.authorization,
|
|
2732
2731
|
'x-request-id': baseRequestId && "".concat(baseRequestId, "-span-").concat(spanCounter++)
|
|
2733
|
-
}, _this.headers),
|
|
2732
|
+
}, _this.headers), requestMethod === 'POST' ? {
|
|
2733
|
+
'Content-Type': 'application/json'
|
|
2734
|
+
} : {}),
|
|
2734
2735
|
credentials: _this.credentials,
|
|
2735
2736
|
body: requestMethod === 'POST' ? JSON.stringify(params) : null,
|
|
2736
2737
|
signal: actualSignal
|
|
@@ -2801,7 +2802,6 @@
|
|
|
2801
2802
|
var requestMethod = (_ref6 = method !== null && method !== void 0 ? method : this.method) !== null && _ref6 !== void 0 ? _ref6 : 'POST';
|
|
2802
2803
|
if (requestMethod === 'POST') {
|
|
2803
2804
|
url = "".concat(this.apiUrl, "/").concat(apiMethod);
|
|
2804
|
-
this.headers['Content-Type'] = 'application/json';
|
|
2805
2805
|
}
|
|
2806
2806
|
var effectiveFetchTimeout = fetchTimeout !== null && fetchTimeout !== void 0 ? fetchTimeout : this.fetchTimeout;
|
|
2807
2807
|
var controller;
|
|
@@ -2824,10 +2824,12 @@
|
|
|
2824
2824
|
_context2.n = 1;
|
|
2825
2825
|
return fetch(url, {
|
|
2826
2826
|
method: requestMethod,
|
|
2827
|
-
headers: _objectSpread2({
|
|
2827
|
+
headers: _objectSpread2(_objectSpread2({
|
|
2828
2828
|
Authorization: _this3.authorization,
|
|
2829
2829
|
'x-request-id': baseRequestId || 'stream-request'
|
|
2830
|
-
}, _this3.headers),
|
|
2830
|
+
}, _this3.headers), requestMethod === 'POST' ? {
|
|
2831
|
+
'Content-Type': 'application/json'
|
|
2832
|
+
} : {}),
|
|
2831
2833
|
credentials: _this3.credentials,
|
|
2832
2834
|
body: requestMethod === 'POST' ? JSON.stringify(params || {}) : null,
|
|
2833
2835
|
signal: actualSignal
|