Im new to rails. Can someone help explain POST and GET inrails, and
maybe give an example? When is it used? Im learning rails via Agile web
Development with Rails, and soon to download peepcode video's, are these
good resources to learn from?
When you submit a form without an opaque query string you are POSTing. When you grab the variables from a query string you are getting your GET on.
I just got the Agile WDwR beta copy. Interesting stuff. I would check out different API’s like Twitter, Gowalla, etc and see how they expose their data/we seb service.
POST
- can only be generated by a form's submit action/button
- all the values (ie form arguments) get passed in the "params" hence
in rails, you access the values via "params"
- example: in search forms or registration forms, clicking the submit
button generates a POST request to the web server