I may be way off base, but I've been trying to run the curl post command in this recess PHP framework tutorial all afternoon. What I don't understand is how PHP is supposed to interpret my POST, it always comes up as an empty array.
curl -i -X POST -d '{"screencast":{"subject":"tools"}}' \ http://localhost:3570/index.php/trainingServer/screencast.json
(The slash in there is just to make me not look like an idiot, but I executed this from Windows using PHP 5.2, I also tried it on a Linux server, the same version with Linux curl)
There must be something I'm missing because it seems pretty straightforward, the post just isn't being interpreted right, if it was, everything would work great.
This is what I got back:
HTTP/1.1 409 Conflict
Date: Fri, 01 May 2009 22:03:00 GMT
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
{"screencast":{"id":null,"subject":null,"body":null,
"dataUrl":null,"dataMedium":null,"createdOn":null,"author":null}}
application/json
.