axios原生post请求

2021-10-19  本文已影响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
上一篇 下一篇

猜你喜欢

热点阅读