我在React中使用axios进行POST请求:
postRunSimulation(simulationId) {
var requestAnalysis = `${configFile.web.backend}analysis/${simulationId}/run`;
return axios.post(requestAnalysis)
.then(function (response) {
return response.headers;
}, function(error) {
throw new Error('An error occurred : ' + error.status + ' - ' + error.statusText);
});
},
我得到的对象返回具有 headers
属性, 但它是空的。如果我使用Postman进行相同的调用,我会得到头信息。我做错了什么?