Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass POST parameters using PhpStorm REST CLIENT

POST parameters are passed in request body

In which format do I need to pass them in PhpStorm REST CLIENT?

I tried

param=value param:value

Nothing works. Any help appreciated

like image 479
Akhmed Avatar asked Mar 17 '16 13:03

Akhmed


2 Answers

In the Headers section of the Request tab (within the REST Client window), be sure to add a Content-Type header and set it to application/x-www-form-urlencoded.

like image 195
Nate Avatar answered Sep 19 '22 19:09

Nate


When you do form submit in html this actually set the request header Content-Type to application/x-www-form-urlencoded or multipart/form-data in case of the file upload then it will set the request body exactly same as the GET url parameters for example [email protected]&password=123123.

So this should work with you: enter image description here

like image 28
Fareed Alnamrouti Avatar answered Sep 19 '22 19:09

Fareed Alnamrouti