跨域post实例,用到了qs组件来避开ajax信使请求,并兼容Android。

 1 import axios from 'axios';
 2 import qs from 'qs';
 3 
 4 axios.post('http://www.xyz.com/request', qs.stringify(params))
 5 .then(response => {
 6 console.log(response);
 7 })
 8 .catch(err => {
 9 console.log(err);
10 });
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2022-12-23
  • 2021-05-02
  • 2021-09-21
猜你喜欢
  • 2021-04-17
  • 2022-01-03
  • 2021-06-10
  • 2022-12-23
  • 2021-07-27
  • 2021-10-09
相关资源
相似解决方案