👉👉👉 This extension is still under development.
👉👉👉 Latest VS Code Insiders is required and at times this extension might be broken.
REST Book is a Visual Studio Code extension that allows you to perform REST calls in a Notebook interface.
Must be using the latest version of Visual Studio Code Insiders edition.
Changing output view to rich rendered HTML or rich JSON view
To toggle between the different views for the results of calls you can change mimetype like so:
is equivalent to:
In subsequent lines immediately following the first line add any parameters or queries starting with
In the lines following without an empty line will be considered as the Request Headers:
The last lines after a new line separator is the body of the call. Like the following:
Or you can load the body from another file like so:
You can also assign the responses from calls to a variable and use the data from that response in future calls. To do this you would just declare a variable with
And then in future cells you can reference
Using API keys and other secrets
If you'd like to use secret information in your calls like API keys but you don't want to use and save the raw text of these keys in the REST Notebooks, you can use secrets to save and access API keys.
To save secrets, look for the command
Then when use your secrets in your calls using the
And you can see that the actual secret is not saved in the results of the call. Every place that used a secret will be replaced by
To test these interactions, you can play around with this simple server: SandboxServer
Unable to save responses. This should be fixed soon in the next few versions of VS Code Insiders.
Any Other issues
Please submit your issue on the tanhakabir/rest-book repository with exact reproduction steps.