Last post Jul 15, 2013 11:43 AM by l.laxmikant
Jul 14, 2013 09:38 AM|triggered|LINK
Have kind of a general question here... How do you decide when to use "get" vs. "post" on your operation functions? Is best practice to always use post?
Jul 14, 2013 12:07 PM|urenjoy|LINK
In broad sense:
When you are requesting to get data like to get data for gridview then use Get request.
When you have to submit data like to add/edit data then use Post request.
A good thread here:
Jul 15, 2013 11:43 AM|l.laxmikant|LINK
You can use the GET verb whenever you want to GET some data from service for example
GetEmployee, GetAllOrders, GetOrderCount
You use POST method whenever you have to add/update some info on data store for example
UpdateEmployee, AddOrder, UpdateShippingIndfo
You can definetly use the GET with WebInvoke but keep in mind if your clients are cross domain and want to access your RESTful wcf Service through jQuery it is difficult with WebInvoke and GET
See the article for more info on WCF RESTful services