20202501

☆樱花仙子☆ 提交于 2020-05-01 22:36:58

js axios发起get请求

axios.get('http://rap2api.taobao.org/app/mock/238720/getMapping',
            {
                params: {
                    userId: "1"
                }
            })
            .then(function (response) {
                console.log(response);
            })
            .catch(function (error) {
                console.log(error);
            });

js axios发起post请求

axios.post('http://rap2api.taobao.org/app/mock/238720/postMapping',
            {
                params: {
                    userId: "1"
                }
            })
            .then(function (response) {
                console.log(response);
            })
            .catch(function (error) {
                console.log(error);
            });
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!