4 ms·
Well, if you know the full object to save I would use PUT. If you expect the server to fill in ID or something similar I would use POST. But why use PUT for upd
by polack 14y ago
Well, if you know the full object to save I would use PUT. If you expect the server to fill in ID or something similar I would use POST.
But why use PUT for update? Dont you have to post the entire object (all fields) with a PUT? So if you just want to update one field a POST is more appropriate?
- stuffihavemade 14y agoYou could use PATCH instead (which Rails will be using in 4.0).