Provide a method to get the URI an axios instance would use
See original GitHub issueI’d love to be able to configure an axios instance and rather than use it to send a request, simply get back the URI it would generate based on all the defaults.
The main benefit here would be that I could take configured instances and either use them for async communications, or pull the URI out and use them for the src
attribute in HTML elements, etc…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Axios - get request URI data from the response object
You can access it by accessing response.config.url or response.request.responseURL , though if you only want the URI you would need to use ......
Read more >Understanding Axios GET requests - LogRocket Blog
Learn how to make GET requests in Axios with query parameters and API keys, plus concurrent and HEAD requests and error handling.
Read more >How to make an Axios GET request - Educative.io
The get() method requires two parameters to be supplied to it. First, it needs the URI of the service endpoint. Second, it should...
Read more >The Axios Instance | Axios Docs
Instance methods · axios#request(config) · axios#get(url[, config]) · axios#delete(url[, config]) · axios#head(url[, config]) · axios#options(url[, config]) · axios# ...
Read more >Complete Guide to Axios HTTP Client - Reflectoring
Sending Requests with the Axios Instance ... Let us start by invoking a GET method with the Axios HTTP client from our server-side...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Whoaoa, thank you so much!
🎉 🎈
Morning @atrauzzi,
I added a method called
getUri()
as you suggested. There’s a usage/output example in the PR 😄.Cheers,