- What method should I use?
<form action="/search" method="">
<input type="text" name="p" value="">
<input type="submit">
</form>
- What method should I use?
<form action="/tweets" method="">
<input type="text" name="content" value="">
<input type="submit">
</form>
- What method should I use?
<form action="/comments/1" method="">
<input type="text" name="comment" value="">
<input type="submit">
</form>
-
When do we use PUT vs PATCH? with example.
-
When do we use DELETE? with example.
GET - Retrieve information without change server state
POST - Create new resource
PATCH - Update resource (default method since Rails 4)
PUT - Update resource
DELETE - Delete a resource
Edge Rails: PATCH is the new primary HTTP method for updates
http://weblog.rubyonrails.org/2012/2/26/edge-rails-patch-is-the-new-primary-http-method-for-updates/