@villedemontreal/http-request 7.4.6 → 7.4.8
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/README.md +10 -5
- package/dist/config/configs.d.ts +16 -0
- package/dist/config/configs.js +15 -0
- package/dist/config/configs.js.map +1 -0
- package/dist/scripts/index.d.ts +2 -0
- package/dist/scripts/index.js +14 -0
- package/dist/scripts/index.js.map +1 -0
- package/dist/scripts/lint.d.ts +6 -0
- package/dist/scripts/lint.js +31 -0
- package/dist/scripts/lint.js.map +1 -0
- package/dist/scripts/lintFix.d.ts +6 -0
- package/dist/scripts/lintFix.js +40 -0
- package/dist/scripts/lintFix.js.map +1 -0
- package/dist/src/config/configs.d.ts +1 -1
- package/dist/src/config/configs.js.map +1 -1
- package/dist/src/config/constants.d.ts +1 -1
- package/dist/src/config/constants.js +2 -2
- package/dist/src/config/constants.js.map +1 -1
- package/dist/src/config/init.js.map +1 -1
- package/dist/src/httpUtils.d.ts +1 -1
- package/dist/src/httpUtils.js +84 -73
- package/dist/src/httpUtils.js.map +1 -1
- package/dist/src/httpUtils.test.js +182 -169
- package/dist/src/httpUtils.test.js.map +1 -1
- package/dist/src/utils/logger.js.map +1 -1
- package/package.json +10 -9
- package/src/config/configs.ts +6 -4
- package/src/config/constants.ts +3 -3
- package/src/config/init.ts +2 -2
- package/src/httpUtils.test.ts +99 -53
- package/src/httpUtils.ts +15 -13
- package/src/utils/logger.ts +8 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ export async function initComponents() {
|
|
|
33
33
|
() => {
|
|
34
34
|
return correlationIdService.getId();
|
|
35
35
|
},
|
|
36
|
-
config.routing.caseSensitive // required since 7.0.0
|
|
36
|
+
config.routing.caseSensitive, // required since 7.0.0
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
//...
|
|
@@ -148,7 +148,6 @@ de l'initialisation de la librairie.
|
|
|
148
148
|
|
|
149
149
|
Retourne les `IOrderBy` spécifiés dans la querystring d'une requête de recherche.
|
|
150
150
|
|
|
151
|
-
|
|
152
151
|
#### urlJoin
|
|
153
152
|
|
|
154
153
|
Util to join part of url:
|
|
@@ -157,7 +156,12 @@ Util to join part of url:
|
|
|
157
156
|
import { httpUtils } from '@villedemontreal/http-request';
|
|
158
157
|
|
|
159
158
|
// To join multiple part of uri:
|
|
160
|
-
let url: string = httpUtils.urlJoin(
|
|
159
|
+
let url: string = httpUtils.urlJoin(
|
|
160
|
+
'http://api.montreal.ca/accounts/',
|
|
161
|
+
'/inum',
|
|
162
|
+
'@5441521452',
|
|
163
|
+
'tickets',
|
|
164
|
+
);
|
|
161
165
|
console.log(url); // http://api.montreal.ca/accounts/inum/@5441521452/tickets
|
|
162
166
|
```
|
|
163
167
|
|
|
@@ -168,7 +172,9 @@ Util to parse an url and get the different parts:
|
|
|
168
172
|
```typescript
|
|
169
173
|
import { httpUtils } from '@villedemontreal/http-request';
|
|
170
174
|
|
|
171
|
-
let url: string = httpUtils.buildUriObject(
|
|
175
|
+
let url: string = httpUtils.buildUriObject(
|
|
176
|
+
'http://api.montreal.ca/accounts/inum/@5441521452/tickets',
|
|
177
|
+
);
|
|
172
178
|
console.log(url); // {"uri": "http://api.montreal.ca/accounts/inum/@5441521452/tickets", "baseUri":"http://api.montreal.ca", "path":"/accounts/inum/@5441521452/tickets"}
|
|
173
179
|
```
|
|
174
180
|
|
|
@@ -210,7 +216,6 @@ Trois "_launch configurations_" sont founies pour déboguer le projet dans VSCod
|
|
|
210
216
|
- "`Debug current tests file - fast`". Lance le fichier de tests _présentement ouvert_ dans VSCode en mode debug. Aucune compilation
|
|
211
217
|
n'est effectuée au préalable. Cette launch configuration doit être utilisée lorsque la compilation incrémentale roule (voir la section "`Mode Watch`" plus haut)
|
|
212
218
|
|
|
213
|
-
|
|
214
219
|
# Aide / Contributions
|
|
215
220
|
|
|
216
221
|
Notez que les contributions sous forme de pull requests sont bienvenues.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configurations for the application.
|
|
3
|
+
*/
|
|
4
|
+
declare class Configs {
|
|
5
|
+
/**
|
|
6
|
+
* Absolute path to the root of the project.
|
|
7
|
+
*/
|
|
8
|
+
root: string;
|
|
9
|
+
/**
|
|
10
|
+
* Absolute path to a directory to use for tests.
|
|
11
|
+
*/
|
|
12
|
+
dataDirPath: string;
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
export declare const configs: Configs;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configs = void 0;
|
|
4
|
+
const path = require("path");
|
|
5
|
+
/**
|
|
6
|
+
* Configurations for the application.
|
|
7
|
+
*/
|
|
8
|
+
class Configs {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.root = path.normalize(`${__dirname}/..`);
|
|
11
|
+
this.dataDirPath = `${this.root}/test-data`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.configs = new Configs();
|
|
15
|
+
//# sourceMappingURL=configs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configs.js","sourceRoot":"","sources":["../../config/configs.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAE7B;;GAEG;AACH,MAAM,OAAO;IAWX;QACE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,YAAY,CAAC;IAC9C,CAAC;CACF;AAEY,QAAA,OAAO,GAAY,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LintFixScript = exports.LintScript = void 0;
|
|
4
|
+
// ==========================================
|
|
5
|
+
// All scripts must be included here!
|
|
6
|
+
//
|
|
7
|
+
// The scripting library uses this index to quickly
|
|
8
|
+
// find all the scripts available in the application.
|
|
9
|
+
// ==========================================
|
|
10
|
+
var lint_1 = require("./lint");
|
|
11
|
+
Object.defineProperty(exports, "LintScript", { enumerable: true, get: function () { return lint_1.LintScript; } });
|
|
12
|
+
var lintFix_1 = require("./lintFix");
|
|
13
|
+
Object.defineProperty(exports, "LintFixScript", { enumerable: true, get: function () { return lintFix_1.LintFixScript; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../scripts/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAC7C,qCAAqC;AACrC,EAAE;AACF,mDAAmD;AACnD,qDAAqD;AACrD,6CAA6C;AAC7C,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LintScript = void 0;
|
|
13
|
+
const src_1 = require("@villedemontreal/scripting/dist/src");
|
|
14
|
+
const path_1 = require("path");
|
|
15
|
+
const configs_1 = require("../config/configs");
|
|
16
|
+
class LintScript extends src_1.ScriptBase {
|
|
17
|
+
get name() {
|
|
18
|
+
return 'lint';
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return `Run the ESLint validation (including ESLint and Prettier rules).`;
|
|
22
|
+
}
|
|
23
|
+
main() {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const projectRoot = (0, path_1.resolve)(`${configs_1.configs.root}/..`);
|
|
26
|
+
yield this.invokeShellCommand(`${projectRoot}/node_modules/.bin/eslint`, [projectRoot]);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.LintScript = LintScript;
|
|
31
|
+
//# sourceMappingURL=lint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../scripts/lint.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAAiE;AACjE,+BAA+B;AAC/B,+CAA4C;AAC5C,MAAa,UAAW,SAAQ,gBAAU;IACxC,IAAI,IAAI;QACN,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,kEAAkE,CAAC;IAC5E,CAAC;IAEe,IAAI;;YAClB,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,GAAG,iBAAO,CAAC,IAAI,KAAK,CAAC,CAAC;YAClD,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,WAAW,2BAA2B,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1F,CAAC;KAAA;CACF;AAbD,gCAaC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LintFixScript = void 0;
|
|
13
|
+
const src_1 = require("@villedemontreal/scripting/dist/src");
|
|
14
|
+
const path_1 = require("path");
|
|
15
|
+
const configs_1 = require("../config/configs");
|
|
16
|
+
class LintFixScript extends src_1.ScriptBase {
|
|
17
|
+
get name() {
|
|
18
|
+
return 'lint-fix';
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return `Fix the code using ESLint and Prettier rules).`;
|
|
22
|
+
}
|
|
23
|
+
main() {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const projectRoot = (0, path_1.resolve)(`${configs_1.configs.root}/..`);
|
|
26
|
+
this.logger.info(`Fixing using Prettier rules`);
|
|
27
|
+
yield this.invokeShellCommand(`${projectRoot}/node_modules/.bin/prettier`, [
|
|
28
|
+
'--write',
|
|
29
|
+
projectRoot,
|
|
30
|
+
]);
|
|
31
|
+
this.logger.info(`Fixing using ESLint rules`);
|
|
32
|
+
yield this.invokeShellCommand(`${projectRoot}/node_modules/.bin/eslint`, [
|
|
33
|
+
'--fix',
|
|
34
|
+
projectRoot,
|
|
35
|
+
]);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.LintFixScript = LintFixScript;
|
|
40
|
+
//# sourceMappingURL=lintFix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lintFix.js","sourceRoot":"","sources":["../../scripts/lintFix.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAAiE;AACjE,+BAA+B;AAC/B,+CAA4C;AAE5C,MAAa,aAAc,SAAQ,gBAAU;IAC3C,IAAI,IAAI;QACN,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,gDAAgD,CAAC;IAC1D,CAAC;IAEe,IAAI;;YAClB,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,GAAG,iBAAO,CAAC,IAAI,KAAK,CAAC,CAAC;YAClD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,WAAW,6BAA6B,EAAE;gBACzE,SAAS;gBACT,WAAW;aACZ,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YAC9C,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,WAAW,2BAA2B,EAAE;gBACvE,OAAO;gBACP,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAvBD,sCAuBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.js","sourceRoot":"","sources":["../../../src/config/configs.ts"],"names":[],"mappings":";;;AACA,4BAA4B;AAE5B;;GAEG;AACH,MAAa,OAAO;IAKlB;;OAEG;IACI,gBAAgB,CAAC,aAAwC;QAC9D,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACxB,MAAM,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"configs.js","sourceRoot":"","sources":["../../../src/config/configs.ts"],"names":[],"mappings":";;;AACA,4BAA4B;AAE5B;;GAEG;AACH,MAAa,OAAO;IAKlB;;OAEG;IACI,gBAAgB,CAAC,aAAwC;QAC9D,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YACxB,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;SACH;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,wBAAwB,CAAC,qBAAmC;QACjE,IAAI,CAAC,sBAAsB,GAAG,qBAAqB,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,IAAI,qBAAqB;QACvB,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE;YAChC,MAAM,IAAI,KAAK,CACb,yGAAyG,CAC1G,CAAC;SACH;QACD,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,mBAAmB,CAAC,gBAAyB;QAClD,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,IAAI,kBAAkB;QACpB,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;YACnC,MAAM,IAAI,KAAK,CACb,sHAAsH,CACvH,CAAC;SACH;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;CACF;AApED,0BAoEC;AACY,QAAA,OAAO,GAAY,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAChD,6BAA6B;AAE7B;;GAEG;AACH,MAAa,SAAS;IAgBpB;QACE,oCAAoC;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,oBAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO;YACL;;eAEG;YACH,eAAe,EAAE;gBACf;;;mBAGG;gBACH,QAAQ,EAAE,KAAK;gBAEf;;;mBAGG;gBACH,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC;IACJ,CAAC;CACF;AA7CD,8BA6CC;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAChD,6BAA6B;AAE7B;;GAEG;AACH,MAAa,SAAS;IAgBpB;QACE,oCAAoC;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,oBAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAI,OAAO;QACT,OAAO;YACL;;eAEG;YACH,eAAe,EAAE;gBACf;;;mBAGG;gBACH,QAAQ,EAAE,KAAK;gBAEf;;;mBAGG;gBACH,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC;IACJ,CAAC;CACF;AA7CD,8BA6CC;AAEY,QAAA,SAAS,GAAc,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/config/init.ts"],"names":[],"mappings":";;;AACA,4BAA4B;AAC5B,uCAAoC;AAEpC,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/config/init.ts"],"names":[],"mappings":";;;AACA,4BAA4B;AAC5B,uCAAoC;AAEpC,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;GAEG;AACH,SAAgB,IAAI,CAClB,aAAwC,EACxC,qBAAmC;AACnC;;;;;GAKG;AACH,gBAAyB;IAEzB,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;KACpD;IAED,IAAI,CAAC,qBAAqB,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;KAC7D;IAED,IAAI,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;KAC1E;IAED,iBAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACxC,iBAAO,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;IACxD,iBAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE9C,6CAA6C;IAC7C,uCAAuC;IACvC,4CAA4C;IAC5C,6CAA6C;IAC7C,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC;AAhCD,oBAgCC;AAED;;;;;;;;GAQG;AACH,SAAgB,QAAQ;IACtB,OAAO,WAAW,CAAC;AACrB,CAAC;AAFD,4BAEC"}
|
package/dist/src/httpUtils.d.ts
CHANGED
package/dist/src/httpUtils.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.httpUtils = exports.HttpUtils = void 0;
|
|
4
13
|
const general_utils_1 = require("@villedemontreal/general-utils");
|
|
@@ -136,7 +145,7 @@ class HttpUtils {
|
|
|
136
145
|
}
|
|
137
146
|
const orderBy = {
|
|
138
147
|
key,
|
|
139
|
-
direction
|
|
148
|
+
direction,
|
|
140
149
|
};
|
|
141
150
|
orderBys.push(orderBy);
|
|
142
151
|
}
|
|
@@ -172,7 +181,7 @@ class HttpUtils {
|
|
|
172
181
|
*/
|
|
173
182
|
urlJoin(...args) {
|
|
174
183
|
return _.map(args, this.removeSlashes)
|
|
175
|
-
.filter(x => !!x)
|
|
184
|
+
.filter((x) => !!x)
|
|
176
185
|
.join('/');
|
|
177
186
|
}
|
|
178
187
|
/**
|
|
@@ -200,85 +209,87 @@ class HttpUtils {
|
|
|
200
209
|
* throw an error on 4XX-5XX status responses.
|
|
201
210
|
*
|
|
202
211
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
`
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
212
|
+
send(request) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
if (_.isNil(request)) {
|
|
215
|
+
throw new Error(`The request object can't be empty`);
|
|
216
|
+
}
|
|
217
|
+
if ('status' in request) {
|
|
218
|
+
throw new Error(`The request object must be of type SuperAgentRequest. Make sure this object has NOT already been awaited ` +
|
|
219
|
+
`prior to being passed here!`);
|
|
220
|
+
}
|
|
221
|
+
if (!request.url || request.url.indexOf('://') < 0) {
|
|
222
|
+
throw new Error(`The URL in your request MUST have a protocol and a hostname. Received: ${request.url}`);
|
|
223
|
+
}
|
|
224
|
+
if (general_utils_1.utils.isBlank(request.get(http_header_fields_typed_1.default.X_CORRELATION_ID))) {
|
|
225
|
+
const cid = configs_1.configs.correlationId;
|
|
226
|
+
if (!general_utils_1.utils.isBlank(cid)) {
|
|
227
|
+
request.set(http_header_fields_typed_1.default.X_CORRELATION_ID, cid);
|
|
228
|
+
}
|
|
218
229
|
}
|
|
219
|
-
}
|
|
220
|
-
// ==========================================
|
|
221
|
-
// Adds timeouts, if they are not already set.
|
|
222
|
-
// ==========================================
|
|
223
|
-
const responseTimeoutRequestVarName = '_responseTimeout';
|
|
224
|
-
const timeoutRequestVarName = '_timeout';
|
|
225
|
-
request.timeout({
|
|
226
|
-
response: request[responseTimeoutRequestVarName] !== undefined
|
|
227
|
-
? request[responseTimeoutRequestVarName]
|
|
228
|
-
: constants_1.constants.request.timeoutsDefault.response,
|
|
229
|
-
deadline: request[timeoutRequestVarName] !== undefined
|
|
230
|
-
? request[timeoutRequestVarName]
|
|
231
|
-
: constants_1.constants.request.timeoutsDefault.deadline
|
|
232
|
-
});
|
|
233
|
-
logger.debug({
|
|
234
|
-
sendingCorrelationIdHeader: request.get(http_header_fields_typed_1.default.X_CORRELATION_ID) || null,
|
|
235
|
-
url: request.url,
|
|
236
|
-
method: request.method,
|
|
237
|
-
msg: `Http Client - Start request to ${request.method} ${request.url}`
|
|
238
|
-
});
|
|
239
|
-
let result;
|
|
240
|
-
const timer = new general_utils_1.Timer();
|
|
241
|
-
try {
|
|
242
|
-
result = await request;
|
|
243
|
-
}
|
|
244
|
-
catch (err) {
|
|
245
230
|
// ==========================================
|
|
246
|
-
//
|
|
247
|
-
// But we prefere to return those responses as regular
|
|
248
|
-
// ones and leave it to the caling code to validate
|
|
249
|
-
// the status! That way, we can differenciate between
|
|
250
|
-
// a 4XX/5XX result and a *real* error, for example if
|
|
251
|
-
// the request can't be sent because of a network
|
|
252
|
-
// error....
|
|
231
|
+
// Adds timeouts, if they are not already set.
|
|
253
232
|
// ==========================================
|
|
254
|
-
|
|
255
|
-
|
|
233
|
+
const responseTimeoutRequestVarName = '_responseTimeout';
|
|
234
|
+
const timeoutRequestVarName = '_timeout';
|
|
235
|
+
request.timeout({
|
|
236
|
+
response: request[responseTimeoutRequestVarName] !== undefined
|
|
237
|
+
? request[responseTimeoutRequestVarName]
|
|
238
|
+
: constants_1.constants.request.timeoutsDefault.response,
|
|
239
|
+
deadline: request[timeoutRequestVarName] !== undefined
|
|
240
|
+
? request[timeoutRequestVarName]
|
|
241
|
+
: constants_1.constants.request.timeoutsDefault.deadline,
|
|
242
|
+
});
|
|
243
|
+
logger.debug({
|
|
244
|
+
sendingCorrelationIdHeader: request.get(http_header_fields_typed_1.default.X_CORRELATION_ID) || null,
|
|
245
|
+
url: request.url,
|
|
246
|
+
method: request.method,
|
|
247
|
+
msg: `Http Client - Start request to ${request.method} ${request.url}`,
|
|
248
|
+
});
|
|
249
|
+
let result;
|
|
250
|
+
const timer = new general_utils_1.Timer();
|
|
251
|
+
try {
|
|
252
|
+
result = yield request;
|
|
256
253
|
}
|
|
257
|
-
|
|
254
|
+
catch (err) {
|
|
258
255
|
// ==========================================
|
|
259
|
-
//
|
|
256
|
+
// SuperAgent throws a error on 4XX/5XX status responses...
|
|
257
|
+
// But we prefere to return those responses as regular
|
|
258
|
+
// ones and leave it to the caling code to validate
|
|
259
|
+
// the status! That way, we can differenciate between
|
|
260
|
+
// a 4XX/5XX result and a *real* error, for example if
|
|
261
|
+
// the request can't be sent because of a network
|
|
262
|
+
// error....
|
|
260
263
|
// ==========================================
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
264
|
+
if (err.status && err.response) {
|
|
265
|
+
result = err.response;
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
// ==========================================
|
|
269
|
+
// Real error!
|
|
270
|
+
// ==========================================
|
|
271
|
+
logger.debug({
|
|
272
|
+
error: err,
|
|
273
|
+
url: request.url,
|
|
274
|
+
method: request.method,
|
|
275
|
+
timeTaken: timer.toString(),
|
|
276
|
+
msg: `Http Client - End request ERROR request to ${request.method} ${request.url}`,
|
|
277
|
+
});
|
|
278
|
+
throw {
|
|
279
|
+
msg: `An error occured while making the HTTP request to ${request.method} ${request.url}`,
|
|
280
|
+
originalError: err,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
272
283
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
284
|
+
logger.debug({
|
|
285
|
+
url: request.url,
|
|
286
|
+
method: request.method,
|
|
287
|
+
statusCode: result.status,
|
|
288
|
+
timeTaken: timer.toString(),
|
|
289
|
+
msg: `Http Client - End request to ${request.method} ${request.url}`,
|
|
290
|
+
});
|
|
291
|
+
return result;
|
|
280
292
|
});
|
|
281
|
-
return result;
|
|
282
293
|
}
|
|
283
294
|
/**
|
|
284
295
|
* Gets all the values of a querystring parameter.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpUtils.js","sourceRoot":"","sources":["../../src/httpUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpUtils.js","sourceRoot":"","sources":["../../src/httpUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAA0F;AAE1F,uEAA6D;AAC7D,4BAA4B;AAE5B,8CAA2C;AAC3C,kDAA+C;AAC/C,2CAA8C;AAE9C,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,WAAW,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAa,SAAS;IAAtB;QACmB,0BAAqB,GAAG,yBAAyB,CAAC;QAqOnE;;;;;;;;;;;;;;;;;;;WAmBG;QACI,2BAAsB,GAAG,CAC9B,GAAY,EACZ,GAAW,EACX,YAAsD,EAChD,EAAE;YACR,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAChD,IAAI,IAAU,CAAC;YACf,IAAI,CAAC,qBAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;gBAC3B,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;gBACzB,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE;oBACzB,MAAM,QAAQ,GAAG,+BAA+B,OAAO,GAAG,CAAC;oBAC3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