vscode-restclient
vscode-restclient copied to clipboard
Auto save response to file and open the file on the side
After setting "rest-client.previewResponseInUntitledDocument" to true in setting, it's able to show the response in an untitled document, but each time close the window, it ask if want to save to file.
So my question is if it's possible to offer the option to auto save to an file with configuration file name?
This functionality would be a lot better than the current behavior of rest-client.previewResponseInUntitledDocument
. It is a huge interruption to ask for the filename of every single response.
It would help a lot when working with large MB responses that the HTML viewer can't handle. Yes, even when "when rest-client.disableHighlightResonseBodyForLargeResponse and rest-client.disableAddingHrefLinkForLargeResponse is set to true" and size is set appropriately, the HTML viewer can not handle large responses on my machine.
Additional items on my wishlist:
- Use the
@name
for the filename instead of "Untitled-1" just as it is for preview. - Parse the
@name
field for {{variableName}} fields and maybe even a file location!
# @name ./myHappyApi_{{username}}.json
would parse to myHappyApi_brenda.json if@username
was set to brenda and save the response to the current folder.
- Really fancy:
# @name ./response_sequence_{{count}}.json
would find filepaths like@name
, get the largest count and save the response with count+1. Each time you ran the request, you'd get another file.