Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getUri doesn't work before request is sent #2254

Closed
adam-mccormick opened this issue Jun 28, 2019 · 2 comments
Closed

getUri doesn't work before request is sent #2254

adam-mccormick opened this issue Jun 28, 2019 · 2 comments

Comments

@adam-mccormick
Copy link

Describe the bug
The getUri method only returns the supplied url parameter and not the full request URL. However, using this method in a response interceptor seems to work correctly

This might be a duplicate or related to #2190 but I'm not sure so just throwing this out there anyway.

To Reproduce
Runkit example

The example shows that the getUri method only returns the url parameter in the request interceptor but in the response interceptor the full URL is returned.

Expected behavior
The getUri method always returns the full URL of the request config

Environment:

  • Axios Version [0.19.0]
  • OS: [OSX 10.13.4]
  • Environment [node >= 10]
@JiaboHou
Copy link

JiaboHou commented Oct 2, 2019

Looks like there's a PR for it: #2128

@Alanscut
Copy link
Collaborator

hi @adam-mccormick , the url before sent to request doesn't include the baseURL is a breaking change since v0.17.0. This change introduced by PR #950 which makes the baseURL work in the interceptor.

@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants