我能够成功地获取到所有的正文数据,但是头部信息是空的。响应头中有一个访问令牌,我需要它来进行未来的请求。当我使用curl或postman时,我可以看到头部信息,但是使用isomorphic-fetch却得到了一个空的头部。
fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: data})
.then(checkStatus)
.then(response => response.headers ); // response.json() gets me body data
有人成功地使用isomorphic-fetch检索标题吗?