Closed asdofindia closed 9 years ago
This is pretty close, but I've left some comments in the diff that need to be fixed. It will be nice to have this stream again. Thanks for taking the time to contribute :)
Its strange that the buffered body doesn't match the streamed one. If I get some more time I'd like to debug why.
Hey @dannycoates thanks for the suggestions. I've tried my best to fix it up. But I have no idea how this request library works. If you succeed in debugging, please take time to patch this. I just made a PR because #82 is annoying and I was just gonna show off my web app working on android.
Thanks @asdofindia, I'm going to spend some time debugging this and get it fixed ASAP.
I was able to find why the image in the buffered case is corrupted, request
is returning the body encoded as utf8 string instead of a buffer. There's a slightly simpler fix to #84 than using a stream which I think we should deploy first, since I'd rather not risk regressing the bug #82 fixed.
see #86
When requests are not streamed, the icon images are corrupted. This was introduced in #82 . I have tried to maintain the pipe while still listening to the response or errors.
Possibly fixes #84 . Not sure if there're bugs though. :baby: