美文网首页
axios原生post请求

axios原生post请求

作者: 前端小猪仔 | 来源:发表于2021-10-19 14:50 被阅读0次

可以使用qs进行对参数的序列化

const data = { 
        'accName': accName,
          'algorithmType': algorithmType
        }
        axios({
          method: 'post',
          url: '/hash/api/aggre/account/detail',
          data: qs.stringify(data),
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Authorization': token
          }
        }).then(res => {
          
        });
实例.png

相关文章

网友评论

      本文标题:axios原生post请求

      本文链接:https://www.haomeiwen.com/subject/hqsaoltx.html