-
Notifications
You must be signed in to change notification settings - Fork 233
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
Can't intercept html in response body #9
Comments
Hi Tophe, For api.github.com, it's very wired, I thought there might be a https relative problem, but I tried https://httpbin.org, everything works fine. I doubt it's somehow relative to how the code to decode the buffer. I'll keep it in the issues list to when I can finally take time to figure it out. PS: in the final response, resp.body contains the correct json object =.= |
I also ran into this. It turned out gzip was the culprit for me. decorateRequest: function ( req ) {
req.headers[ 'Accept-Encoding' ] = 'utf8';
return req;
} and |
Not sure if this is related: I faced a similar issue where I couldn't access any data from the response in the intercept hook (also when proxying to Github), yet I saw the response in the browser. It turned out to be a caching-related issue. decorateRequest: function(req) {
delete req.headers['if-modified-since'];
delete req.headers['if-none-match'];
return req;
} |
Hello Villadora,
I can't seem to intercept html in a response body - here is the test case : topheman@264e451
Other use case where intercept doesn't work : https://api.github.com/
Even if it's json returning and I can access data in the intercept callback, but there is an encoding problem (though everything is in utf8).
Tophe
The text was updated successfully, but these errors were encountered: