It'd be nice to have the option of including JS code snippets to be resolved when sending the request
Yeah this would be really good. Postman's ability to run scripts pre-request is handy for doing simple things like setting dates in the future. I guess there is a slightly elaborate workaround for this in REST client. You could run a local server which executes your script and responds in json which the REST client file can extract the variables from?
I am about to migrate from Postman. This is the only feature missing. I don't think running a local server would convince my team.
I need to apply encription / decryption for all requests, so pre&post JS processing would be awesome!
It would be POSTMAN-killer feature!
Yeah I would also like to have some scripting abilities.
At least, some more complex variable processing to cover most of cases: like replacing only a substring of a variable, things like that. Some "templating" abilities can be enough.
It would be handy, for JSON, to have a jq style post filter ability.
I am looking for this feature then arrived here. It would be handy.
Add custom-filter or hooks during req & res duration.
It would be handy, for JSON, to have a
jqstyle post filter ability.
Yes, it would!! Ideally, integrated in the rest client output pane. Or a way to integrate or "pipe" to existing vscode jq extensions such as jq-vscode or VSCode jq playground.
Maybe we're not that far from such an integration: VSCode jq playground is already able to apply jq filters to any opened file or unsaved buffer, specified by its path or name. But it seems the rest client output pane is a different object which VSCode jq playground does not recognize: it looks like we'd just need an option in the rest client to send the json part of the rest call response to a given file.
First of all, love this extension, I was searching some solution for code blocks in the extension, I just want to throw some ideas, maybe helpful or not.
Is it possible for variable resolution, using IIFE style ( similar to other **Monkey chrome extensions) to wrap up user's custom code block?
e.g.
(function (param) {
'use strict';
/*
* user custom code block goes here
*/
return param + '->output';
})('input');
The similar feature in postman pre-request script
on the home page for this extension it says "Generate code snippets for HTTP request in languages like Python, JavaScript and more" but have not seen any examples or documentation around this feature
on the home page for this extension it says "Generate code snippets for HTTP request in languages like Python, JavaScript and more" but have not seen any examples or documentation around this feature
That is a feature that turns your request in to code that sends the same request.. If you do the "Rest Client: Generate code snippet" action you'll see what it does.
Most helpful comment
It would be handy, for JSON, to have a
jqstyle post filter ability.