jordy 0.20.2 → 0.20.4
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.
|
@@ -22,9 +22,13 @@ var BaseInterceptorHttpApi = (function () {
|
|
|
22
22
|
if (!paramsAdditional) {
|
|
23
23
|
return url;
|
|
24
24
|
}
|
|
25
|
+
var serializedParams = _this.paramsSerializer(paramsAdditional);
|
|
26
|
+
if (serializedParams[0] === '?') {
|
|
27
|
+
return url + serializedParams;
|
|
28
|
+
}
|
|
25
29
|
return (url +
|
|
26
30
|
(url.includes('?') ? '&' : '?') +
|
|
27
|
-
|
|
31
|
+
serializedParams);
|
|
28
32
|
}
|
|
29
33
|
return url;
|
|
30
34
|
};
|
|
@@ -2,9 +2,10 @@ import { qs } from '../util';
|
|
|
2
2
|
import { AxiosHttpNetworkProvider } from './axios';
|
|
3
3
|
import { BasicHttpApi } from './BasicHttpApi';
|
|
4
4
|
import { defaultHeaderCreator } from './network.util';
|
|
5
|
+
var defSerialize = function (params) { return qs.serialize(params); };
|
|
5
6
|
export function createHttpApi(baseUrl, headerCreator, paramsSerializer, withCredentials) {
|
|
6
7
|
if (headerCreator === void 0) { headerCreator = defaultHeaderCreator; }
|
|
7
|
-
if (paramsSerializer === void 0) { paramsSerializer =
|
|
8
|
+
if (paramsSerializer === void 0) { paramsSerializer = defSerialize; }
|
|
8
9
|
if (withCredentials === void 0) { withCredentials = false; }
|
|
9
10
|
return new BasicHttpApi(new AxiosHttpNetworkProvider(), baseUrl, headerCreator, paramsSerializer, withCredentials);
|
|
10
11
|
}
|
package/esm5/util/queryString.js
CHANGED
|
@@ -49,7 +49,7 @@ export var qs = {
|
|
|
49
49
|
if (!isObject(params)) {
|
|
50
50
|
throw new Error("serializeToQueryString: params is not object.\n".concat(params ? JSON.stringify(params) : params));
|
|
51
51
|
}
|
|
52
|
-
return (withQuestionMark ? '?' : '') + _serialize(params);
|
|
52
|
+
return (withQuestionMark === true ? '?' : '') + _serialize(params);
|
|
53
53
|
},
|
|
54
54
|
append: function (search, data) {
|
|
55
55
|
if (!search) {
|