ng2-rest 13.0.20 → 13.0.23
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/browser/esm2020/lib/rest-request.mjs +3 -2
- package/browser/esm2020/lib/rest.class.mjs +9 -1
- package/browser/fesm2015/ng2-rest.mjs +10 -1
- package/browser/fesm2015/ng2-rest.mjs.map +1 -1
- package/browser/fesm2020/ng2-rest.mjs +10 -1
- package/browser/fesm2020/ng2-rest.mjs.map +1 -1
- package/client/esm2020/lib/rest-request.mjs +3 -2
- package/client/esm2020/lib/rest.class.mjs +9 -1
- package/client/fesm2015/ng2-rest.mjs +10 -1
- package/client/fesm2015/ng2-rest.mjs.map +1 -1
- package/client/fesm2020/ng2-rest.mjs +10 -1
- package/client/fesm2020/ng2-rest.mjs.map +1 -1
- package/lib/rest-request.js +2 -1
- package/lib/rest-request.js.map +1 -1
- package/lib/rest.class.js +9 -0
- package/lib/rest.class.js.map +1 -1
- package/package.json +4 -4
- package/tmp-environment.json +26 -26
|
@@ -808,7 +808,15 @@ class Rest {
|
|
|
808
808
|
req(method, item, params, doNotSerializeParams = false, isArray = false) {
|
|
809
809
|
const modelUrl = this.creatUrl(params, doNotSerializeParams);
|
|
810
810
|
const body = item ? JSON.stringify(item) : void 0;
|
|
811
|
+
// console.log('this.customContentType', this.customContentType)
|
|
811
812
|
if (this.customContentType) {
|
|
813
|
+
const customHeaderKeys = this.customContentType.keys();
|
|
814
|
+
const currentHeaderKeys = this._headers.keys();
|
|
815
|
+
currentHeaderKeys
|
|
816
|
+
.filter(key => !customHeaderKeys.includes(key))
|
|
817
|
+
.forEach(key => {
|
|
818
|
+
this.customContentType.set(key, this._headers.get(key));
|
|
819
|
+
});
|
|
812
820
|
this._headers = this.customContentType;
|
|
813
821
|
}
|
|
814
822
|
else {
|
|
@@ -1190,7 +1198,8 @@ class RestRequest {
|
|
|
1190
1198
|
}
|
|
1191
1199
|
try {
|
|
1192
1200
|
if (!response) {
|
|
1193
|
-
log
|
|
1201
|
+
// console.log(`[${method}] (jobid=${jobid}) request to: ${url}`);
|
|
1202
|
+
// console.log(headers.toJSON())
|
|
1194
1203
|
response = await axios({
|
|
1195
1204
|
url,
|
|
1196
1205
|
method,
|