launchiamenterprise / keyrunner

KeyRunner: A secure, codeless VS Code extension for API testing & Designing. Features include data encryption at rest, sensitive data masking, and the innovative Playground for chaining API requests without coding
https://keyrunner.app
MIT License
15 stars 1 forks source link

Feature request - support for binary content as body #2

Closed yramrax closed 8 months ago

yramrax commented 9 months ago

I am using the VSCode extension v1.0.29 and I haven't found a way to test endpoints that accept "application/octet-stream" as payload. It would be great if one of the drop down options for the body in the "Raw" tab would be "From File", "Binary" or similar that allows the user to select an arbitrary file to use as body. Another option would be to have an additional tab "File" or "Binary" for this purpose

launchiamenterprise commented 9 months ago

Thanks for your input! We will get this feature delivered this week.

launchiamenterprise commented 8 months ago

This feature is now live with version#v1.0.32 . Closing the issue.

image
yramrax commented 8 months ago

Thank you very much I've tried it out and it is working in most cases. But it seems that the content type is determined based on the file, which probably makes sense in 99% of the cases. But due to this some services can fail. E.g. if you have an uploadFileService that accepts application/octet-stream (sure it can be argued that the service is misconfigured and should accept /, but sometimes you simply can't change the service) then you will get a Status 415 back, if uploading an excel file for example. And by just looking at the request it is not clear that the value set in Headers is overwritten. An awesome addition would be to display the evaluated content-type right to the selected file and to make it changeable there