我该如何为我的React应用程序中的所有fetch请求添加自定义全局标头?是否有函数可以为所有fetch请求提供全局标头?
getFoo() {
return fetch(apiUrl + "API/foo").then(
function(response) {
return response.json();
});
}
想要为我在React中的所有fetch请求添加全局hear,我卡在这里了,请帮助我,谢谢。