redstone-dart / redstone

A metadata driven microframework for Dart.
http://redstone-dart.github.io/redstone
MIT License
342 stars 42 forks source link

Improve documentation - redstone_mapper: Updating resources (MongoDB and PostgreSQL). #57

Open digitalfiz opened 9 years ago

digitalfiz commented 9 years ago

You have examples for getting a list of a resource and adding a new with POST but nothing on updating a resource using PUT. I have done it mysql but am curious as to how you would do it.

luizmineo commented 9 years ago

Usually, I don't make it too different from adding a new resource. The main difference is that I expect the resource to have an id attribute (the service can verify that, and return a 400 status code if id is not provided). I will update the documentation with a more complete example, meanwhile, you can see an example here