vscode-restclient icon indicating copy to clipboard operation
vscode-restclient copied to clipboard

Response handler scripts support

Open QuAzI opened this issue 2 years ago • 1 comments

Please support scripts in the same way as similar plugin for JetBrains products https://www.jetbrains.com/help/pycharm/http-client-in-product-code-editor.html#using-response-handler-scripts


To insert the script in-place, prepend it with > and enclose it in {% %}:

GET host/api/test

> {%
// Response Handler Script
...
%}

To insert the script from an external file, prepend it with >:

GET host/api/test

> scripts/my-script.js

It will be very usable to use HTTP Client for automated tests

QuAzI avatar Sep 11 '22 07:09 QuAzI

Maybe pr #674 is helpful for this use case

AnWeber avatar Sep 11 '22 18:09 AnWeber