abhijithvijayan
abhijithvijayan

Reputation: 931

Handling Redirects with axios in Browser

How to handle the redirects in axios so as to obtain the redirected URL within the browser, during an API call?

I need to get the url after redirection using GET

Upvotes: 1

Views: 8061

Answers (1)

BlueWater86
BlueWater86

Reputation: 1817

This isn't currently possible in the browser but is in Node. If you are using node you can access the url after redirection in

response.request.res.responseUrl

https://github.com/axios/axios/issues/799

Upvotes: 2

Related Questions