jQuery dataFilter response undefined

隐身守侯 提交于 2019-12-05 20:59:17

I can verify that this issue is a pain in the arse. What needs to be done is to use $.ajaxSetup({}); along with the converters:

$.ajaxSetup

http://api.jquery.com/jQuery.ajaxSetup/

Then, you'll need to use Converters to handle your dataType, dataFilters, callbacks, and parsing.

jQuery.Extensions - Converters

http://api.jquery.com/extending-ajax/#Converters

While you don't have to use Converters via $.ajaxSetup -

$.ajax({ converters: 'params go here' });

Because of the scenario you're facing, all data that is passed as your jsonp needs to have this converter applied to it. This should provide you with a more realistic control based on your expected result type and needs.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!