POST empty when curling JSON

Viewed 9954

I'm using curl to send this:

curl -i -H "Accept: application/json" -H "Content-type: application/json" -X POST -d "{firstname:james}" http://hostname/index.php

I'm trying to display POST like this in index.php

<?php
die(var_dump($_POST)); 
?>

Which outputs

array(0) {
}

I must be misunderstanding something about sending JSON data via POST

Thank you for your time

2 Answers
Related