Get final URL in Axios request

Viewed 1079

I'm trying to debug an Axios GET request which doesn't seem to be returning, in Node.

By attaching an interceptor, I can find the base URL, and the params object, but I can't find the complete URL that is actually being requested.

Is there a way to get access to this, given a request object?

Since the call doesn't seem to be completing, solutions that use the response object are not helpful to me.

Similarly, since this is Node, there isn't an obvious other way to get access to the outbound network request (like using the Network tab of the browser's dev tools).

1 Answers

You can use:

axios.getUri(request)

which returns exactly this.

Related