thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.61k stars 126 forks source link

Is there a way to display binary response instead of saving into file or opening in code? #1481

Closed qchroman closed 6 months ago

qchroman commented 6 months ago

Dear all,

I'm using a starter plan of this great product and I was wondering if there is a way to either automatically open some hex editor in VS Code, or display the response in HEX/Base64 format when the response is a binary?

Currently, the VS Code states that the response is a binary file, the display is not supported and offers to Save File or Open in Code.

These are extra steps to check the response. I'd rather see a response in the console, or have VS Code automatically open it in some built-in HEX editor.

Thank you in advance for your response.

rangav commented 6 months ago

Hi @qchroman

You can click Open in Code button, to view in VS Code built-in Hex editor

qchroman commented 6 months ago

Thank you, @rangav. That's what I'm doing right now, but, that's an extra step. Is there a faster way?

rangav commented 6 months ago

Currently - that is the best way to do it.

qchroman commented 6 months ago

Thank you! Is there a way to parse the response in a console, for example? That would be a way to format it in a format of choice.

rangav commented 6 months ago

Don't think it's possible now, but will make it possible in the next update

qchroman commented 6 months ago

Thank you so much for your response!

rangav commented 6 months ago

Sorry need more clarification

How will you plan to format in console? can you provide more details?

qchroman commented 6 months ago

I thought that if there is a way to process the response in some post-script, or somewhere, I could get the response and transform it into any format I like considering it is binary. I could then do something like

console.log(formatted_response);

and I would see it on the Output tab in the VS Code.

rangav commented 6 months ago

Thanks got it, will think of a solution for this use case.

qchroman commented 6 months ago

JIC, there is no rush or immediate requirement. It was merely out of curiosity I've created this question and I think everyone can live w/o this feature :)

In any case, thank you so much for swift replies.