My co-worker Tanha Kabir has a cool Visual Studio Code extension called REST Book. Sure, there’s lots of extensions and lots of ways to call REST APIs from Visual Studio Code - not to mention the command line. However, REST Book is a Postman-like notebook that uses the Native Notebooks UI experience that’s already built into Visual Studio code. If you already love the concept of Notebooks like I do, you’ll love REST Book. It’s electric paper! Just like .NET Interactive or Jupyter Notebooks, it mixes Prose and Code in a very clean and very intuitive interface.
Here’s me calling into my Nightscout server to see my real-time Blood Glucose: ![]() Pretty cool. It’s early days but I think Tanha already has a very interesting combination of a native Notebook experience and a Postman-like experience. Note I’ve also created a “SECRET” in the form of my API Key, and then I can refer to it in the GET request using $SECRETS.name. You can also assign variables like: let foo = GET https://hanselman.com and then use them in subsequent cells with $.foo.headers.User-Agent, etc. Just install the Rest Book extesnion in VS Code Insiders, and make a new empty text file with a .restbook extension. You can do GET and have the URL on multiple lines if you split on a ? or & GET https://www.google.com And you can POST and each new line will be a Header, until the last lines after a line separator which is the body of the call. POST https://www.myexampleapi.com If you want to get involved, look at the source, file an issue or bug, or just give compliments, do it over on her repository at https://github.com/tanhakabir/rest-book Have fun! Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more. © 2021 Scott Hanselman. All rights reserved. Exploring the Visual Studio Code REST Book extension for native Notebooks published first on http://7elementswd.tumblr.com/ via Tumblr Exploring the Visual Studio Code REST Book extension for native Notebooks
0 Comments
Leave a Reply. |
About UsIf you want to keep up with the latest in web design, you have to be willing to study and learn on an ongoing basis. If you are a web developer or web designer, you’ll find a lot of useful tutorials and code snippets collection here. Furthermore, we also discuss more general topics of web design and how the role of a web designer has evolved over the years.
|