How VSCode's RestClient saved me from Postman

I do not want to say that Postman is bad because it would be a lie. However, it is not really my favorite piece of software in my tool belt. First, it requires an account. Second, the account subscribed me to a newsletter I totally do not care. Third, it does a lot of things I do not care about on my daily use. Fourth, is a sluggish Electron app that takes forever to do anything.1 And I can go on and on. Maybe for general documentation is good but for development… DEAR GODS, I HATE IT.

At some point, just to avoid Postman I started saving cURL snippets in my snippets' manager. The fact that I felt relief, and I was more “productive” by browsing a library of command line commands says a lot about Postman.

Anyway, this was not a solution for the long term. At work, I have to develop and maintain an application with a lot of endpoints.

Fortunately, I’ve found the perfect plugin: RestClient.

I like RestClient SO MUCH

RestClient is a wonderful l VSCode extension. The reason I love it is that it is consistent with my “everything is a text file” philosophy. There is no reason (for development) to have weird databases synchronized online in some proprietary system. Let’s just have a plain text file describing the endpoints I need to test and use, and that I can commit into my repository.

So, for example, I now have a folder (called rest-doc) in my project’s root and containing a bunch of .http files that I can use as a perfect replacement for Postman.

Each file contains endpoints and documentation for a specific resource. For instance, imagine I have a book resource. I will create a book.http file with this content:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
@testBookId = 12401249912

###
# Get a Book by ID
GET {{host}}/books/{{testBookId}} HTTP/1.1
Authorization: Bearer {{token}}

###
# Create a new Book.
POST {{host}}/books/ HTTP/1.1
Authorization: Bearer {{token}}
Content-Type: application/json

{
	"author": "Some Guy",
	"title": "Some Book"
}

When I open this file in VSCode, I get all the feature I expect. I can click on a request and run the request directly into VSCode. I can copy a request in cURL format or generate code snippets in different languages. I can do all this and more: just take a look at the official documentation!

As I said, everything is just plain text that I can track and version in the Git repository of the source code. No more accidentally overwritten environment or path variables. No more sync issues. And, most importantly, I do not have to open that bloated piece of software called Postman.

I am much happier now. If you use VSCode and you want to ditch all those obnoxious REST client interfaces, I really recommend taking a look at the RestClient extension.


  1. I have nothing against Electron when the apps are well done like VSCode or Obsidian. Postman is just not one of them. ↩︎

Header Image
How to debug a Node.js application remotely in VSCode

Debugging a remote Node.js application in VSCode is an elementary procedure. Here it is a small “how to” in case you are struggling with it. A quick answer because you want a …

Read
Header Image
Kotlin Development in VS Code

Kotlin is a really sweet language. It is the perfect thing in between a “super-powerful and but difficult language” like Rust or Modern C++, and a “super-easy but that seems to be designed …

Read
Header Image
My favorite Visual Studio Code extensions

Visual Studio Code is my editor of choice. I started with it because of the top-notch TypeScript integration, and then I stuck with it for all the rest (all but for big projects in languages …

Read
comments powered by Disqus