I'm using Axios to make a secure POST call to an API. This returns an URL within the response headers under 'Location'.
I can see the URL being populated within Chrome's dev tools:
but the response inside JS from Axios (below) doesn't contain this information:
Any advice greatly received!
I'm using Axios to make a secure POST call to an API. This returns an URL within the response headers under 'Location'.
I can see the URL being populated within Chrome's dev tools:
but the response inside JS from Axios (below) doesn't contain this information:
Any advice greatly received!
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Jul 11, 2017 at 14:27 RichRich 1,0512 gold badges18 silver badges43 bronze badges 2- Possible duplicate of Axios get access to response header fields. – Rita Kondratyeva Commented Sep 2, 2017 at 17:31
- Please find another detailed discussion regarding the same here – Apurva jain Commented Oct 2, 2017 at 14:57
1 Answer
Reset to default 2Possibly it occurs because you are doing a cors request that doesn't expose location header by default.
You need to add this Cors Configuration to your server side app.
Access-Control-Expose-Headers: Location
as you can see here: https://developer.mozilla/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745273100a4619871.html
评论列表(0条)