如何从使用post来获取数据的api中获取数据?这是我的代码,但是当我记录数据时api不返回任何内容。 最佳答案 我认为您尝试作为请求正文传递的数据是url编码的表单数据,因此,请尝试axios.post('https://example.com/api?function=getSomething') .then(function(response) { console.log(response.data); });