From 4f043956f76828a7c4a65bfebadc4a60dbe2cfaf Mon Sep 17 00:00:00 2001 From: Konstantin Losev Date: Sat, 6 Jul 2019 08:44:46 +0300 Subject: [PATCH] Fixed data for multipart/form-data --- src/test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test.ts b/src/test.ts index 51b2f4a..08107f6 100644 --- a/src/test.ts +++ b/src/test.ts @@ -15,6 +15,7 @@ import * as Ajv from 'ajv'; import * as nunjucksDate from 'nunjucks-date'; import * as fs from 'fs'; import * as FormData from 'form-data'; +import { URLSearchParams } from 'url'; var deepEql = require("deep-eql"); var lineNumber = require('line-number'); @@ -431,7 +432,7 @@ const performRequest = async (requestObject: requestsObjectSchema, requestName: form.append(item.name, item.value); } }); - axiosObject.data = form; + axiosObject.data = form.getBuffer(); axiosObject.headers = {...axiosObject.headers,...form.getHeaders()}; } }