Reputation: 2764
I am sending a 'POST' request to a web API controller - "/api/customers". However, checking the request object is showing a 'GET' request instead.
$.ajax({
url: "/api/customers",
type: "POST",
data: jsonSerialize,
dataType: "jsonp"
});
Upvotes: 1
Views: 359
Reputation: 42497
You can't perform a post when using JSONP. You have to change the type to GET, or change the dataType to something other than JSONP.
http://forum.jquery.com/topic/post-query-with-jquery-ajax-and-jsonp-datatype
Upvotes: 4