RESTing like a boss - alternatives to Postman
rest http tools

What tools I found as reasonable alternatives to Postman when it comes to working with REST APIs and HTTP requests
January 22, 2020

I’m a huge fan of the modern move to separate frontends and backends with APIs and HTTP(S) communication. To test those APIs I’ve been using Postman, but it wasn’t always a good experience - requests are difficult to share, the app itself is slow and sometimes, after an update, loses data. That’s why I went to search for a replacement. And found it.

Warning: Don’t let the title of this article lead you astray. While I love sleeping, this is about Representational State Transfer (REST), not human resting.

tl;dr

With Postman becoming a sluggish overkill for my needs I chose Nightingale REST client for quick API testing and REST client extension for Visual Studio Code for project work.

Postman

Industry standard, probably everybody knows it. Free, slow to start-up, memory intensive, based on Electron. Has easy to use interface with many features I don’t need (runner, collections, sharing, environments, online sync etc.). Occasionaly forgots open tabs.

Nightingale

[Update 12021] A lot has changed in a year! Nightingale has matured. It now has a sleek modern Windows UI and supports tabs. Also, it’s free.

Postman contender from Windows Store. Was built natively to tackle the performance problem of Electron (consumes 40 MB of RAM compared to Postman’s 350 MB). Super fast. Doesn’t use tabs and the interface design is a bit confusing. Feature-wise aspires to be on par with Postman and eventually surpass it.

Nightingale

Free version is limited in the amount of “items” (= requests) you can keep in a collection. Since there are no tabs, collections are the only way I found to persist multiple requests. You can create 5 items per collection and have 1 collection without going Premium.

I will probably keep using it for quick requests when I just need to try an API.

Visual Studio Code

But the winner is… not surprisingly… VS Code! The amount of extensions that exist for this editor/IDE is incredible, and it’s no wonder that someone has built a REST Client for Visual Studio Code.

Free, supports tabs (duh), user interface is just text, has auto-complete, no unnecessary functionality.

When I work on a project which contains REST APIs (recently almost all of them), I create reqs.http file and put all relevant HTTP requests into it. That way it’s easy to do versioning, track changes and share this file with others.

HTTP requesty ve VS Code

Usage notes

To install search for humao.rest-client in the extensions directory.

Create a file with .http extension (or .rest, or switch language mode to HTTP) to activate advanced editor support.

Requests are separated by ###.

Comments begin with #.

Variables:

# definition
@apiRoot = http://localhost:5000

# usage
GET {{apiRoot}}/api/test

Code completion for variables

Completion for system variable

Code completion support for HTTP methods, headers, variables etc.

RFC request format is supported (with or without HTTP version):

GET http://localhost:5000 HTTP/1.1

###

POST http://localhost:5000/api/test
Content-Type: application/json

{
    "name": "Martin"
}

Everything after blank line is considered request body.

To load body from a file, use <:

POST http://localhost:5000/api/test
Content-Type: application/json

< ./myfile.json

Query strings can span across multiple lines (it’s necessary that the line starts either with ? or &):

GET {{siteRoot}}/test
    ?page=1
    &count=10

Send request with the Send Request link:

Send Request link

Or press Ctrl+Alt+R. (Ctrl+Alt+L to re-run last request.)

And see the results:

Response

JSON properly formatted and foldable.

These quick notes barely scratch the surface of what the REST client extension is capable of. To learn more, read official readme at VS Marketplace.

Others

In my pursuit of Postman replacement I tried other options as well (but there aren’t that many). Notable:

comments powered by Disqus