Open
Description
I'm trying to ask in this way:
request.post('/properUrl')
.set('Content-Type', 'multipart/form-data')
.set('Accept', 'application/json')
.attach('file', './files/test.pdf', 'test.pdf')
.type('formData')
.then((response) => {
expect(response).to.have.status(200);
})
I tried also with sending type of data in field: .field('type', 'formData')
and the server say's, it's not proper way (responses with 400).
Curl of proper request is:
curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' {"type":"formData"} '/properUrl'
Anyone knows what happen?
Metadata
Metadata
Assignees
Labels
No labels