question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a method to get the URI an axios instance would use

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
atrauzzicommented, Aug 6, 2018

Whoaoa, thank you so much!

🎉 🎈

3reactions
anthonygauthiercommented, Aug 6, 2018

Morning @atrauzzi,

I added a method called getUri()as you suggested. There’s a usage/output example in the PR 😄.

Cheers,

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found