How to make a JSONP request from Javascript without JQuery?

后端 未结 12 1284
遇见更好的自我
遇见更好的自我 2020-11-22 17:27

Can I make a cross-domain JSONP request in JavaScript without using jQuery or other external library? I would like to use JavaScript itself and then parse the data and make

12条回答
  •  伪装坚强ぢ
    2020-11-22 17:46

    If you are using ES6 with NPM, you can try node module "fetch-jsonp". Fetch API Provides support for making a JsonP call as a regular XHR call.

    Prerequisite: you should be using isomorphic-fetch node module in your stack.

提交回复
热议问题