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.

Possibility to expose more of the Axios original http response?

See original GitHub issue

Thanks for this useful extensions, you guys rocks! 🤘

So I’ve been using this extension outside of official Hoppscotch web app. This extensions work wonderfully for working-around Browser’s AJAX CORS limitation, by routing HTTP request through this extension. However I found some limitation in terms of the exposed HTTP response data. My use case is to:

  • Get the final URL of the response, after an HTTP request encountered HTTP redirect(s).
  • I figure it will need response.request.responseURL from the original HTTP response of Axios. Which currently this extension does not expose.

I track it down into these lines, the extension currently return limited set of properties of the Axios’s original response object: https://github.com/hoppscotch/hoppscotch-extension/blob/427969d278ec969cc7091aabc4acaf716cfae643/src/index.ts#L153-L160

Any chance to add maybe something like this?

rawAxiosResponse: res

// or maybe:
responseUrl: res.request.responseURL

I know that this is your extension mainly tailored for your own web app, so if it is not possible that is completely understandable. I’ll probably just make my own fork and build an alternative extension. Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AndrewBastincommented, Apr 11, 2021

Closed via #42

I will still update this issue until the feature becomes live in the Chrome and Firefox extension stores.

0reactions
rizdaprasetyacommented, Apr 5, 2021

Yes, make sense. I also considered that risk, so I better use a fork instead for my project. This whole issue is just notifying the upstream (this repo) about changes I made and if it may benefit the upstream. The final decision is still understandably upstream project owner’s to take, there is no wrong decision there, and no deadline/timeline involved, suit yourself. Cheers 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Making HTTP requests with Axios - CircleCI
Axios works by making HTTP requests with NodeJS and XMLHttpRequests on the browser. If the request was successful, you will receive a response...
Read more >
Axios send the same request twice and ignore the ... - GitHub
Describe the bug axios.post sends duplicate POST request and ignores the first response, only receives the second response.
Read more >
Axios handling errors - Stack Overflow
In this example, the response to the request will be 400 with an error message in JSON. This is the error I'm getting:...
Read more >
Understanding Axios.create - LogRocket Blog
It is more advantageous to use Axios with Axios.create because it creates a new instance of Axios with a custom config. An Axios...
Read more >
Complete Guide to Axios HTTP Client - Reflectoring
In this article, we will understand Axios and use its capabilities to make different types of REST API calls from JavaScript applications.
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