jeudi 28 juin 2018

PhpStorm rest client not sending file during multipart post submission

I am trying to test an API to accept multipart form-data. I am trying to use the PhpStorm rest client. I set the method to Post and the path to my endpoint and then under request body I checked Text, put some text in there and I also check File Upload(multipart/form-data) and put the path and filename into the File To Send text box.

When I click debug and run the request, I only receive the text. I do not get a file upload. If I uncheck text and leave File upload clicked, it properly sends the file.

I need two things. I need to be able to send text in the message body and I also need to be able to attach multiple files. In other words, I need to set up a true multipart/form-data post request.

Any suggestions would be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire