Side navigation
#13996 closed bug (notabug)
Opened June 05, 2013 11:52PM UTC
Closed June 06, 2013 01:18AM UTC
jQuery.ajax: doesn't emit complete event for jsonp requests
| Reported by: | me@pyrokinetiq.com | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.10.1 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
When attempting an AJAX request with a dataType of 'jsonp', the complete event/callback never get ran. If this is intentional (which it shouldn't be -- how else am I supposed to handle jsonp AJAX errors?) it's not mentioned in the jQuery documentation.
Reproducable:
$.ajax({
dataType: 'jsonp',
url: 'http://shopify.pyrokinetiq.com/credit/fetchCustomer/1',
complete: function(xhr, status){
console.log(status);
}
});
Expected same result as:
$.ajax({
url: 'http://shopify.pyrokinetiq.com/credit/fetchCustomer/1',
complete: function(xhr, status){
console.log(status);
}
});
Attachments (0)
Change History (1)
Changed June 06, 2013 01:18AM UTC by comment:1
| resolution: | → notabug |
|---|---|
| status: | new → closed |
Your URL http://shopify.pyrokinetiq.com/credit/fetchCustomer/1 is sending JSON and not JSONP. Ask about how you can put the P in your JSON (and why we cannot just P for you) on forum.jquery.com or StackOverflow.