AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
222 stars 20 forks source link

File seems to be binary and cannot be opened as text - Error from vscode for zip file #276

Closed alan-francis closed 2 months ago

alan-francis commented 2 months ago

When trying to emit a .zip file from a POST method, encounter the following error. cannot open vscode-remote://wsl%2Bubuntu/home/alan/.vscode-server/data/User/globalStorage/anweber.vscode-httpyac/.httpyac/http_0.0.0.0_8088_orchestrate.zip.73246235.zip. Detail: File seems to be binary and cannot be opened as text

AnWeber commented 2 months ago

Hi, yes I understand your problem, but it was more or less a design decision. Extensions can register any files in vscode and extend the functionality. For example, there is a viewer for the zip display . However, I cannot see whether a corresponding viewer is installed and activated (no API). I am now taking an optimistic approach. I always try to open and display the file. But because I don't notice any errors due to the lack of an API, I think it's the user's responsibility to tell httpyac if an error occurs. This is possible with # @save or # @openWith

Does that help you? Suggestions for improvement?