javirln / chrome-rest-client

Automatically exported from code.google.com/p/chrome-rest-client
0 stars 0 forks source link

Not able to do a POST request with json payload #315

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create REST API call with POST request (For testing just index.php with echo 
of $_POST)
2. Add header: Content-Type: application/json
3. Add payload: {"id":"7","name":"Sjoerd","birthday":"1983-01-01"}

What is the expected output? What do you see instead?
Expected:
<pre>Array
(
    {"id":"7","name":"Sjoerd","birthday":"1983-01-01"}
)
</pre>

Instead: $_POST is empty....

On what operating system, browser and browser version?
- Mac OS X Yosemite (10.10.4)
- Chrome version 44.0.2403.89 (64-bit)
- Advanced REST client version: 3.1.9

Please provide any additional information below.
If I change step 2 from
2. Add header: Content-Type: application/json
to
2. Add header: Content-Type: application/x-www-form-urlencoded
then I receive the expected data in $_POST

Original issue reported on code.google.com by sjoerdbo...@gmail.com on 23 Jul 2015 at 11:21

Attachments: