The project I'm currently working has a whole bunch of JSON actions in order to populate cascading dropdowns via ajax calls. Since they're technically Select queries and we're trying to be RESTful, we've been marking these actions with the HttpGet
attributes. However by default, JsonResult
does not allow to return results via a GET. So we've had to explicitly call Json(data, JsonRequestBehavior.AllowGet)
.
What I'm wondering is, is this bad practice? Should we only be allowing Post requests to our Json actions? If it makes a difference, this is an enterprise application, that requires a log in to a particular environment before it can be accessed.