-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Added getUri method #1712
Added getUri method #1712
Conversation
And just to confirm, is this method available on an already configured instance? const axiosInstance = axios.create({ baseUrl: "..." });
console.log(axiosInstance.getUri({...moreconfig...})); |
Yup! Because this line config = mergeConfig(this.defaults, config); Takes the default configs and merge them with the specified config. Therefore you could call Cheers 😄, |
It's xmas in August. Looking at the changeset, man, I guess I was right about it being a pinky-stretch away, eh? 😄 |
Yeah, it was crazy simple.. I had the solution Friday before closing my laptop and when I opened it up this morning I was like : "Well, could've committed that Friday 😅 ". Now just gotta wait for someone to approve the change and merge it to axios 🤞 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@delirius325 can you add documentation to the README for the new method?
@emilyemorehouse Done 😄 |
Wow, look what I found. Can you add geturi to the introduction? |
Hi @martin-yin! I welcome you to contribute to the documentation and add the example 😄 ! |
This is a new feature to get the built URI of an axios instance. It's been added in regards to this issue #1624 , I thought the use-case was interesting and I didn't think it was a good idea to include this feature in a third-party module.
This code
Outputs