ng2-rest 13.0.20 → 13.0.21

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.
@@ -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$1.d(`[${method}] (jobid=${jobid}) request to: ${url}`);
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,
@@ -1311,9 +1320,6 @@ class RestRequest {
1311
1320
  this.subjectInuUse[jobid][cancelFn]('[ng2-rest] on purpose canceled http request');
1312
1321
  }
1313
1322
  }
1314
- else {
1315
- // console.log(`somehow second time cancel ${jobid}`)
1316
- }
1317
1323
  });
1318
1324
  const sub = subject.subscribe({
1319
1325
  next: a => observer.next(a),