@artilleryio/int-core 2.14.0-533dfcd → 2.14.0-77c9a48
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/lib/engine_http.js +16 -8
- package/package.json +2 -2
package/lib/engine_http.js
CHANGED
|
@@ -403,15 +403,23 @@ HttpEngine.prototype.step = function step(requestSpec, ee, opts) {
|
|
|
403
403
|
requestParams.formData,
|
|
404
404
|
function (acc, v, k) {
|
|
405
405
|
let V = template(v, context);
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
V.
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
406
|
+
let options;
|
|
407
|
+
if (V && _.isPlainObject(V)) {
|
|
408
|
+
if (V.contentType) {
|
|
409
|
+
options = { contentType: V.contentType };
|
|
410
|
+
}
|
|
411
|
+
if (V.fromFile) {
|
|
412
|
+
const absPath = path.resolve(
|
|
413
|
+
path.dirname(context.vars.$scenarioFile),
|
|
414
|
+
V.fromFile
|
|
415
|
+
);
|
|
416
|
+
fileUpload = absPath;
|
|
417
|
+
V = fs.createReadStream(absPath);
|
|
418
|
+
} else if (V.value) {
|
|
419
|
+
V = V.value;
|
|
420
|
+
}
|
|
413
421
|
}
|
|
414
|
-
acc.append(k, V);
|
|
422
|
+
acc.append(k, V, options);
|
|
415
423
|
return acc;
|
|
416
424
|
},
|
|
417
425
|
f
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artilleryio/int-core",
|
|
3
|
-
"version": "2.14.0-
|
|
3
|
+
"version": "2.14.0-77c9a48",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@artilleryio/int-commons": "2.10.0-
|
|
7
|
+
"@artilleryio/int-commons": "2.10.0-77c9a48",
|
|
8
8
|
"@artilleryio/sketches-js": "^2.1.1",
|
|
9
9
|
"agentkeepalive": "^4.1.0",
|
|
10
10
|
"arrivals": "^2.1.2",
|