Closed ASaiAnudeep closed 4 years ago
As far as I'm aware either parse a JSON object in the request's { data }
field, or you could try using form-data. Just set the request header to indicate so.
I was able to use form-data
with the following code:
const options = {};
const form = new FormData();
form.append('my_file', fs.readFileSync(path), { contentType: 'application/xml', filename: 'jUnit.xml' });
options.data = form.getBuffer();
options.headers = form.getHeaders();
phin(options)
Hi,
I am trying to make a request with multipart/form-data. Is it possible to send such requests in phin.
Can I use form-data in phin??