@faasjs/request 1.1.1 → 1.3.0
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -115,7 +115,7 @@ async function request(url$1, {
|
|
|
115
115
|
method: method ? method.toUpperCase() : "GET",
|
|
116
116
|
path: uri.pathname + uri.search,
|
|
117
117
|
port: uri.port || (uri.protocol === "https:" ? "443" : "80"),
|
|
118
|
-
timeout,
|
|
118
|
+
timeout: timeout || 5e3,
|
|
119
119
|
auth,
|
|
120
120
|
pfx,
|
|
121
121
|
passphrase,
|
|
@@ -210,8 +210,8 @@ async function request(url$1, {
|
|
|
210
210
|
response.body = (parse || JSON.parse)(response.body);
|
|
211
211
|
logger$1.debug("response.parse JSON");
|
|
212
212
|
} catch (error) {
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
logger$1.warn("response plain body", response.body);
|
|
214
|
+
logger$1.error(error);
|
|
215
215
|
}
|
|
216
216
|
if (response.statusCode >= 200 && response.statusCode < 400)
|
|
217
217
|
resolve(response);
|
package/dist/index.mjs
CHANGED
|
@@ -92,7 +92,7 @@ async function request(url, {
|
|
|
92
92
|
method: method ? method.toUpperCase() : "GET",
|
|
93
93
|
path: uri.pathname + uri.search,
|
|
94
94
|
port: uri.port || (uri.protocol === "https:" ? "443" : "80"),
|
|
95
|
-
timeout,
|
|
95
|
+
timeout: timeout || 5e3,
|
|
96
96
|
auth,
|
|
97
97
|
pfx,
|
|
98
98
|
passphrase,
|
|
@@ -187,8 +187,8 @@ async function request(url, {
|
|
|
187
187
|
response.body = (parse || JSON.parse)(response.body);
|
|
188
188
|
logger.debug("response.parse JSON");
|
|
189
189
|
} catch (error) {
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
logger.warn("response plain body", response.body);
|
|
191
|
+
logger.error(error);
|
|
192
192
|
}
|
|
193
193
|
if (response.statusCode >= 200 && response.statusCode < 400)
|
|
194
194
|
resolve(response);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/request",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@faasjs/logger": "1.
|
|
24
|
+
"@faasjs/logger": "1.3.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@faasjs/logger": "1.
|
|
27
|
+
"@faasjs/logger": "1.3.0"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"npm": ">=9.0.0",
|