Reputation: 103348
I have the following jQuery code:
$.ajax({
url: Url,
dataType: 'JSONP',
type: 'POST',
success: function (data, textStatus, jqXHR) {
//callback function here
},
error: function (xhr, ajaxOptions, thrownError) {
//report error
}
});
However, when i view this AJAX request in Fiddler, my request has been converted from a POST
to a GET
.
This is not allowed with the API I'm connecting to, as it must be a POST
request.
Why is this happening?
Upvotes: 2
Views: 1863
Reputation: 181
You cannot use POST with JSONP see https://groups.google.com/forum/?fromgroups=#!topic/jquery-dev/5-tKI-7zQvs for more detail on this.
Upvotes: 1