diepm / vim-rest-console

A REST console for Vim.
658 stars 54 forks source link

Allow to run command before request #78

Open dkuku opened 5 years ago

dkuku commented 5 years ago

this would be useful to get an auth token I'm thinking about something:

export TOKEN=Cookie=`curl https://swapi.co/api/people/1/ |jq --arg --raw-output '.name'`
echo $TOKEN

a way to pipe the curl output would be also usefull - when the return value is long it's hard to check it in vim - piping to jq or tail could be interesting

diepm commented 5 years ago

A recent PR has added an ability to read an env variable. Do you think it works (though how the env variable is set is outside VRC)?

emaniacs commented 3 years ago

a way to pipe the curl output would be also usefull - when the return value is long it's hard to check it in vim - piping to jq or tail could be interesting

i create pr for pipe option, you can pull from it https://github.com/diepm/vim-rest-console/pull/93