How to get Header Location value from a Fetch request in browser

后端 未结 2 726
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-04 21:29

From a ReactJS - Redux front app, I try to get the Location Header value of an REST API response.

When I Curl this :

curl -i -X POST -H \"Authorizat         


        
2条回答
  •  一整个雨季
    2021-01-04 21:34

    Besides to expose the Location Header in the server.

    I just could access the location in the react application with:

    response.headers.location;
    

提交回复
热议问题