rest-book
rest-book copied to clipboard
add vscode settings to variables
could be exposed similar to secrets in #78
My use case:
I have an extension I am working on that requires REST API host and a few other settings. In general, similar extensions allow to set those settings in user or workspace configuraiton files.
I would like to be able to use and access them in REST Book cells for queries without the need to change target host in my test notebook and all of the rest call cells.
I think this scenario is very common for a typical REST apps workflow.
Would be good to access them with getConfiguration('path.to.setting.key')
as vars or something similar in the context of REST book.
Just to clarify, you'd like to pull from your current vscode settings into REST calls? or you'd like to add and use settings through the extension?
pull existing settings into REST calls.
For example, I might be testing dev or staging env.
I have xyz.api.host
setting set in vscode. That config is different for dev or staging env.
I would like to use that as a variable and when I change that setting all REST calls would still work, but I'll be hitting a different server :)
I believe it's a very common scenario when working with REST APIs and testing or comparing different environments.
And would you want an UI to edit your settings or would you rather just edit your settings on your own?
nah, I like the built-in Settings editor.
cool! Should be easy enough then!