problem POSTing with curl and REST using scaffold_resource

I issued the following curl command to post to the database using REST: curl -i -X POST -d "<heartrate><heartRate>102</

<sessionID>1002</sessionID><timeStamp>15068</timeStamp></ " http://localhost:3000/heartrates

I have tested the GET (with curl also) and it works fine! curl http://localhost:3000/heartrates/45

I think what you're missing is setting the Content-type header to text/xml... not positive, but I think that might trigger rails to parse the xml into a params hash. You set a header with the -H option.

I've never used the -i or -X options... will have to check those out. You might also want to use the -v option which gives you a lot more feedback on the command line as to what's happening.

And of course, there's always checking the development.log since the incoming params are dumped in there.

b

chirag wrote: