Reputation: 24121
When you simply type a web address such as:
http://localhost/MyController/MyAction
this calls the MyAction
function inside the MyController
class.
My question: is this request an HttpPost, an HttpGet, or neither?
Upvotes: 0
Views: 38
Reputation: 60466
Everytime you simple type in a url in the browser results in a GET
request.
You can specifiy the accepted http method (verb) by using the several attributes.
Upvotes: 1
Reputation: 55032
It is a HTTP GET by default.
[HttpPost]
public ActionResult Foo(){
}
This would be HTTPPOST.
Upvotes: 1
Reputation: 6148
It is a GET
request.
POST
requires are usually when a form is submitted
Upvotes: 0