-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Support downloading binary responses #929
Comments
@pryon Thanks for reporting the issue. We used Need to redo how to handle binary files 👍 |
@liyasthomas, this is surely something important to be worked on. I am working on a proposal (once I get the concepts down, I will announce it in the Telegram group for discussion) for a new extensible architecture for handling response bodies of different types, we can manage downloading response files as well in the new architecture. In the mean time, what about disabling download response option for non-JSON responses ? If you give the green light I will implement a PR to temporarily disable the ability for non-JSON responses to be downloaded. |
sounds good. I've been trying to convert Blob to array buffer array - but no use. Let's disable download option for binaries for now. |
Okay, I will work on the PR to temporarily disable that. |
Well, I want separate out the logic from |
Describe the bug
When a binary file (e.g. an image) is requested, the binary content of the response is properly displayed in the response body window, however if the Download file button is clicked, a corrupted blob of data is downloaded instead of the actual binary file that was requested.
To Reproduce
Steps to reproduce the behavior:
http://tim.org/images/TIMtitle.GIF
as the request URLExpected behavior
The same binary file gets downloaded that was requested from the remote server.
Screenshots
Hexdumps of the original and postwoman-downloaded image file.
Left: original image file, downloaded via right-click, Save image as...
Right: image file downloaded via postwoman.io
Desktop:
Additional context
When looking at the corrupted file, notice the double-quote in the very beginning and the very end, the unicode-escaped sequences and the occasional new
EF BF BD
byte triplets. Its size is also 2-3 times bigger than that of the original file.The text was updated successfully, but these errors were encountered: