I'm building some services with ASP.NET Web API to perform calculations. Should the requests be GETs or POSTs?
The calculations will have 0..n parameters, but most likely 3-6. I plan to put the parameters in the body as json. This leads me to think I should be using POSTs.
Thoughts? Thanks!
Given that the calculations are idempotent, you should use GET. Browsers may cache these requests by default (which I assume for your application is a good thing). Also, there will be no annoying "postback data to server" or whatever popups.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With