👉👉👉 This extension is still under development.
👉👉👉 Latest VS Code Insiders is required and at times this extension might be broken.
version 0.2.4
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
Must be using the latest version of Visual Studio Code Insiders edition.
- Grab the latest VSIX file from the Releases section.
- Inside Visual Studio Code go under the Extensions section and click on the 3 ellipsis in the top right of the pane.
- Click on
Install from VSIX...
and choose the downloaded VSIX. - Close Visual Studio Code.
- Using Powershell or Terminal run
code-insiders --enable-proposed-api rest-book <path to folder you want to run notebook in>
.
- Create a new file to store your REST Calls with a
.restbook
ending. - 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.
https://www.google.com
is equivalent to:
GET https://www.google.com
In 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=2
In 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"
}
To test these interactions, you can play around with this simple server: SandboxServer
When performing an incorrect query, currently the response will be empty and not an erroneous response.
Please submit your issue on the PostBox repository with exact reproduction steps.