@opra/http 1.7.4 → 1.9.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/cjs/http-handler.js +5 -1
- package/esm/http-handler.js +5 -1
- package/package.json +3 -3
package/cjs/http-handler.js
CHANGED
|
@@ -232,11 +232,15 @@ class HttpHandler {
|
|
|
232
232
|
}))
|
|
233
233
|
.flat();
|
|
234
234
|
values = values.map(v => decode(v, { coerce: true, label: key, onFail }));
|
|
235
|
+
if (prm.parser)
|
|
236
|
+
values = prm.parser(values);
|
|
235
237
|
if (values.length)
|
|
236
238
|
context.queryParams[prmName] = values;
|
|
237
239
|
}
|
|
238
240
|
else {
|
|
239
|
-
|
|
241
|
+
let v = decode(values[0], { coerce: true, label: key, onFail });
|
|
242
|
+
if (prm.parser)
|
|
243
|
+
v = prm.parser(v);
|
|
240
244
|
if (values.length)
|
|
241
245
|
context.queryParams[prmName] = v;
|
|
242
246
|
}
|
package/esm/http-handler.js
CHANGED
|
@@ -228,11 +228,15 @@ export class HttpHandler {
|
|
|
228
228
|
}))
|
|
229
229
|
.flat();
|
|
230
230
|
values = values.map(v => decode(v, { coerce: true, label: key, onFail }));
|
|
231
|
+
if (prm.parser)
|
|
232
|
+
values = prm.parser(values);
|
|
231
233
|
if (values.length)
|
|
232
234
|
context.queryParams[prmName] = values;
|
|
233
235
|
}
|
|
234
236
|
else {
|
|
235
|
-
|
|
237
|
+
let v = decode(values[0], { coerce: true, label: key, onFail });
|
|
238
|
+
if (prm.parser)
|
|
239
|
+
v = prm.parser(v);
|
|
236
240
|
if (values.length)
|
|
237
241
|
context.queryParams[prmName] = v;
|
|
238
242
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/http",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Opra Http Server Adapter",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@browsery/http-parser": "^0.5.9-r4",
|
|
10
10
|
"@browsery/type-is": "^1.6.18-r8",
|
|
11
11
|
"@jsopen/objects": "^1.5.0",
|
|
12
|
-
"@opra/common": "^1.
|
|
13
|
-
"@opra/core": "^1.
|
|
12
|
+
"@opra/common": "^1.9.0",
|
|
13
|
+
"@opra/core": "^1.9.0",
|
|
14
14
|
"accepts": "^1.3.8",
|
|
15
15
|
"base64-stream": "^1.0.0",
|
|
16
16
|
"busboy": "^1.6.0",
|