Use something like:
$.ajax({
type: "POST",
url: url,
contentType: 'application/json; charset=utf-8',
data: postData,
dataType: "json",
success: function (result) {
if (redirectOnError("json", result)) {
return;
}
SuccessFunction(result);
},
error: errorHandler
URL s'd be the form of "http://baseurl/controller/action". So make sure you have both defined.
For 'Get' request just change
type: "GET"
And also you have to pass parameters attached in query string.