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.

response (IncomingMessaging) has been read by interceptor and make downstream library unreadable

See original GitHub issue

I am using Axios to get the raw stream, but Interceptors read the stream in utils/getIncomingMessageBody, so that the downstream http client cannot read the stream anymore. This can be a side effect and ideally that stream should be piped and not touch the original stream.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
thomas-p-wilsoncommented, Jul 7, 2021

@kettanaito I’m happy to take this on. Will advise on progress.

0reactions
noahlauxcommented, Jul 8, 2021

@kettanaito For me it was relevant.

I am using the interceptors in a browser context (namely XMLHttpRequest & fetch) and fetch is pretty much useless because of this issue which is why I linked to a possible solution because the issue is the same in the serviceworker context: they HAVE to read the response, yet still pipe it further down to the client.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Adding Http Request Interceptors - Stack Overflow
I have followed this way to intercept the signup requests come to my application in order to do some common validations. But the...
Read more >
Using the Spring RestTemplate Interceptor - Baeldung
In this tutorial, we're going to learn how to implement a Spring RestTemplate Interceptor. We'll go through an example in which we'll create...
Read more >
How to use Axios interceptors, a step-by-step guide with ...
In this tutorial, learn how to use Axios interceptors step by step with an example to track response duration for each Axios request....
Read more >
Top 10 ways to use Interceptors in Angular - Medium
There are many ways to use an interceptor, and I'm sure most of us have only ... It provides a way to intercept...
Read more >
Setting up Axios Interceptors for all HTTP calls in an application
Today, you can: order a car and have it pick you up at your exact location ... In addition to all the basic...
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