I'm trying to test a simple PHP page using the Chrome extension Postman. When I send URL parameters, the script works fine (eg the variables are available in the $_REQUEST
parameter). When I send them as x-www-form-urlencoded
parameters, the $_REQUEST
parameter only contains the PHPSESSID
.
The script:
<?php
var_export($_REQUEST);
?>
When I send URL parameters, $_REQUEST
includes them:
But when I send them as POST
variables, $_REQUEST
doesn't include them:
What am I missing?
I faced the same issue in PostMan and Advance REST Client both. I checked through fiddler and found that my request payload is not converted into JSON format.
I am passing my data in Body as x-www-form-urlencoded
You can fix it by using Content-Type as application/x-www-form-urlencoded in request header.