πππ 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.
- Create and run REST Calls within cells.
- Organize multiple REST Calls within one file.
- Intermingle markdown for documenting your calls.
- View rich HTML and image responses directly inside the Notebook.
- Basic Authentication
- Use data from one call in the next
Must be using the latest version of Visual Studio Code Insiders edition.
- Create a new file to store your REST Calls with a
.restbookending.
- Add an code cell by hovering over the middle of the Notebook and clicking the
+ Code - Add your intended URL as the first line of the cell. By default without specifying a method, it will be a GET call.

google.comis equivalent to:
GET google.comIn subsequent lines immediately following the first line add any parameters or queries starting with ? or & like this:
GET https://www.google.com
?query="fun"
&page=2In the lines following without an empty line will be considered as the Request Headers:
GET https://www.google.com
?query="fun"
&page=2
User-Agent: rest-book
Content-Type: application/json The last lines after a new line separator is the body of the call. Like the following:
POST https://www.myapi.com
User-Agent: rest-book
Content-Type: application/json
{
name: "Foo",
text: "Foo is the most bar of the Foos"
}Or you can load the body from another file like so:
POST https://www.myapi.com
User-Agent: rest-book
Content-Type: application/json
./body.txtYou 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 let and the name of your variable and then a = like so:
let foo = GET google.comAnd then in future cells you can reference foo in your calls with a $ sign. Here's a short example:

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.
Please submit your issue on the tanhakabir/rest-book repository with exact reproduction steps.
