DEV Community

Cover image for Bye bye Postman ! Let's share your REST API calls in team, easily !

Bye bye Postman ! Let's share your REST API calls in team, easily !

Jonathan BROSSARD on January 10, 2020

As developer, we are using tools to make REST API calls (Postman, Insomnia, PostWoman...), and these tools are very usefull. The limits ...
Collapse
 
char0n profile image
Vladimír Gorej • Edited

Thank you for the article and opening this topic. I been using this feature in JetBrains products for some time. It's a great tool for helping you in local development. Also having an ability to create .http files and store them as part of your CVS and share it with your team is a great benefit. There is a great hidden potential in .http files.

But there are some problems concerning cross tooling compatibility and integration. The concept actually has a name: HTTP Request in Editor Specification. This name is shared by both JetBrains and VS code extensions (partially in form of HTTP Request in Editor) respectively. JetBrains went a step further and created a actual RFC specification strictly based on RFC 7230. VS code extension claims to be based on RFC 2616 which has been obsoleted by RFC 7230 some time ago. So you can have possible problems when created files in VS code and running in them in JetBrains. Both extensions claim to support .http/.rest file extension, but IMHO .http file extension should be used exclusively because .rest can be confused with Docutils reStructuredText Document.

There is also an important question of validation and testing. JetBrains extension supports Response Handlers which can intercept the HTTP Responses, validate and assert them. They can be written in ES5 (JavaScript). These Response Handler files can live along with .http files and make sure when somebody is using those file to make HTTP requests he gets expected response. The only problem is that you have to run .http files (with Response Handlers) in JetBrains IDE. So far I haven't found a library that could run the .http files with Response Handlers via CLI. If there was such a library it would allow us to run API tests based on .http files on CI (good idea for opensource project:) and verify .http files against my API. It would also allow running .http files for people not using JetBrains or VS code IDEs.

So I think there is a great potential in this, and the community can fill some gaps that will allow us to utilize HTTP Request in Editor Specification into it's full potential.

Can HTTP Request in Editor Specification replace Postman? I don't think so, at this point in time. But in future, with more tools, integrations and libraries? I'd say: yes, very possibly.

HTTP Request in Editor specification (by Jetbrains): github.com/JetBrains/http-request-...
RFC 7230 - tools.ietf.org/html/rfc7230#sectio...
RFC 2616 - w3.org/Protocols/rfc2616/rfc2616-s...
Implementation of the spec in mainstream languages: github.com/JetBrains/http-request-...
JetBrains HTTP Client documentation: jetbrains.com/help/idea/http-clien...
Rest CLIENT VS extension: marketplace.visualstudio.com/items...
CLI runner for HTTP Request in Editor jetbrains issue: youtrack.jetbrains.com/issue/WI-42002

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Thanks a lot @char0n for this whole comment, terribly interesting !

Collapse
 
char0n profile image
Vladimír Gorej

As I found out today JetBrains has actual plans to implement a runner for the spec: youtrack.jetbrains.com/issue/WI-42002

Collapse
 
aurelio profile image
Aurelio

Fantastic comment, very insightful

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Many thanks @ankush981, indeed, probably one of the best reason : "why open another RAM-hungry app" !

Collapse
 
harlock123 profile image
Lonnie Watson

For Peter Edwards...
Some unfortunate souls are forced to work with underwhelming equipment that benefit from not having yet another tool running. Regardless of capacity... My personal stuff runs circles around the dev env I have to use for work. Everything I can do with something like VS code I do to make that work system at least usable....

Thread Thread
 
gergelypolonkai profile image
Gergely Polonkai

Even if i’m not forced (i could easily afford expanding my RAM), some simply doesn’t want to. I refuse to buy RAM just to run another RAM-hogging app (most probably a “Desktop App” built on Electron) and will use a less RAM-demanding, actually native program. If there is none, i need to be really interested in the platform to put some money in using it (not the case most of the time).

So please, optimize for RAM. Even with today’s tech like SSD drives and such it worth it.

Collapse
 
psupanova profile image
Peter Edwards

Ram-hungry? Equipment is cheap compared to salaries these days running out of ram should just not happen even with swapfile disabled

Thread Thread
 
faridos profile image
faridos

Maybe some people play games while building the app and testing lol

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

It's more like a mind-set, I don't want to have "one more" app launched. We all already have IDE, Chrome, Sequel, Slack, Trello, Terminal ...

Collapse
 
vicoerv profile image
Vico

Yeah, lagging will mess my mood. if it's not 60fps then I'll not code hahaha just kidding 😂

Collapse
 
nick profile image
Nick • Edited

Meh, Postman is still better than this in my humble opinion. They're making you pay for a good reason. I'm getting old, I want a nice an intuitive interface. I pay to save my time and Postman is really helping with this.

EDIT: I just tested it, still a big MEH. Not sure how big your projects are but I feel this is not suitable for the size of my projects.

Collapse
 
yerac profile image
Rich

We have a lot of REST APIs to test, as well as a lot of variables that need changing on the fly quickly by testers to test certain scenarios. For us, Postman works better. This plugin is ok but we have powershell scripts that can do the same stuff and its not as intuitive.

I get the idea behind this in that it just "fits" into version control etc and in theory its easier to have VSCode installed, but I think there is space for both of these tools. This extension fits nicely for quick dev test stuff, but I think I still prefer Postman for more complex scenarios, plus it has a host of other features.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hmm, if it fit you and your team organisation, it can be a solution, for sure :) We're trying here, to avoid to get thousands of tools and be sure to be up to date with "just the repo".

Collapse
 
nick profile image
Nick • Edited

You must be doing a lot. I use a lot of tools too (I work fully digitally), but I close the ones I don't use right away.

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

Some ones are always opened you know (IDE, Slack, Database connection, Terminal, Trello, Chrome etc..) hard to be able to close each tool one you're done with.

Thread Thread
 
nick profile image
Nick

That's really not a lot. And that's about all I need as a fullstack developer. The terminal is part of VSCode and I use pen and paper for my tasks (with ClickUp for project management). I don't use any messaging app WHILE coding, no distractions.

Even tho I dabble with many parts of the systems I maintain and build, I don't have more than 6-8 apps open at the same time. And this is not even half of the apps I can handle open at the same time.

I feel like we're bringing a problem that does not exist just to justify the use of this tool... and I feel like a hater, so I'll stop at this. ;) I hope it's useful to anyone else. I'll try to get more invested into testing it out in the future.

Collapse
 
alejandrorios profile image
Alejandro Rios

Is there a version of this for Jetbrains??

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD
Collapse
 
alejandrorios profile image
Alejandro Rios

😮 I didn't know it, thanks

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

💪

Collapse
 
mohdraqif1 profile image
mohd.raqif

It's nice but one thing to consider. You can share the whole workspace of postman either with a single person or with a team, your choice. I think that reduces the pain of editing the source code or it's syntax maybe.😁

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hi @mohdraqif1 . Yes, you're right, but by putting it into your repo, you can be sure that it's always up to date :) I think that we should never be afraid of updating code/repo.

If we're afraid, it may mean that we are not confident :)

Collapse
 
liyasthomas profile image
Liyas Thomas

Another addition is our project: Postwoman.io - Online API request builder.

GitHub: github.com/liyasthomas/postwoman

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD • Edited

Hi @liyasthomas , It let you save everything in a file that you can share with your team and version into the project repo ?

ps : but believe me, it's on my favorite (from the time where favicon was an Alien head ;) ) and I often use it !

Collapse
 
liyasthomas profile image
Liyas Thomas
  • Allows to save Collections / Folders into JSON and share with Team ☑️ COMPLETED
  • Versioning and saving to GitHub repo - Work in progress
Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

Versioning and saving to GitHub repo will be the perfect option :) can not wait to see it !

Thread Thread
 
liyasthomas profile image
Liyas Thomas

On it. 🌈🌈

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

Maybe let the Alien face as favicon come back, I have so many favorites but this one, I saw it first each time ^

Thread Thread
 
liyasthomas profile image
Liyas Thomas

Will consider that ❤️

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

😍

Thread Thread
 
christopinka profile image
christopinka

"Versioning and saving to GitHub repo - Work in progress"

Didn't see an issue to follow for this. Is it complete now? Thanks

Collapse
 
thebojan profile image
Jordan Munroe

Holy balls this is awesome! I'm working solo at the moment so keeping Postman up to date has been at the absolute bottom of my priority list... My workspace already has 5 necessary windows up(VS, Server console, Code and Chrome) and having to switch between them is already a nightmare without introducing Postman to the mix.

Being able to test the API without leaving Code would be a godsend! Damn am I happy your article showed up in my feed, thanks a googolplex! I didn't even think about using something other than Postman.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hi @thebojan , that's a limit we had with Postman and its workspace... Very happy that we can help you :)

Collapse
 
andreidascalu profile image
Andrei Dascalu

Ford development that is great, but as a generic tool, Postman can export/import curl calls that can be copy/paste to and from terminals
Also, can the env vars be used to parameterize the actual content of the requests? How can certificates be configured?

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Yes it's true that the ability from Postman to generate the command for cURL, Node, PHP, Ruby, Python can be very usefull !

Yes, Auth via SSL Client Certificates is support :)

Collapse
 
hituraj profile image
Hitesh Singh

I am getting below error while posting the call

write EPROTO 1215459160:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242:

Collapse
 
josephmhlanga6 profile image
Joseph@CST

Check if u not trying to call yr API using https when it supports http

Collapse
 
omermushtaq007 profile image
Omer Mushtaq Ahmed

thank you

Collapse
 
luiszuluaga profile image
Luis Zuluaga

Are you using https instead of http? Maybe this is the problem

Collapse
 
ladipo profile image
Ladipo • Edited

Try to use http after your request. e.g GET localhost:3000/articles HTTP/2.0
I have the same error until i use this.

Collapse
 
naveenmohanty profile image
Naveen Mohanty

thank u

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Looks like it come from API you're trying to call no ?

Collapse
 
devjonny profile image
Jonny Olliff-Lee • Edited

REST Client is such a great tool. We using extensively for the purpose of testing, and sharing examples in our project repos.

The ability to use JSONPath to follow links or grab values from your API response to form the next request is invaluable. Not to mention really great for demonstrating how REST APIs are meant to look and work!

If you've not tried it, give it a go. You need to name your request with:

# @name MyAwesomeRequest

But then once you've invoked it you can access a variable of the same name so {{ MyAwesomeRequest... }} the request and response plus the headers and body for both.

It's only more recently I stumbled across the environments feature, but that's made a huge difference in cutting down the noise of declaring loads of variables that change per environment.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hi @devjonny !

Totally agree, grabing values from previous API responses is amazing and let you easily test calls sequences.

Many thanks for this sharing, hope it could help readers to deep dive on this such great extension !

Collapse
 
vonheikemen profile image
Heiker • Edited

Glad to know I'm not the only one who refuses to use postman for simple tasks. I actually build myself command-line utility for the most basic use case, that is making a request based of a collection in a json file.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hi @vonheikemen , thanks a lot for the sharing !

Collapse
 
cirelli94 profile image
Cirelli

I think the good idea is to have the tests in your repository.
Is there a way to place insomnia/postman configurations in our own repos?
It's not a problem to open another program to me.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hi @cirelli94 , yes you can. You could export your Postman calls into a json config file and store it into your repository. But, each time you make an update into Postman, unfortunately, you have to re-export file. You can't just open your versioned json config file into Postman, make your updates, and just make Ctrl+S, it doesn't work, because Postman save it into the Postman application directory.

Collapse
 
cirelli94 profile image
Cirelli

Mm maybe insomnia?
The problem is that in an office you can't impose a IDE, my coworker would kill me 😆

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

I understand ^

Don't know about Insomia, as VS Code fit our needs based on our stack, it's for us the best IDE in term of IDE and save a lot of time (versionning, unit tests, integration tests, lint etc..) :)

Thread Thread
 
nilskp profile image
Nils Kilden-Pedersen • Edited

Why can you impose Insomnia or Postman, but not VSCode?

Thread Thread
 
monisnapjonathan profile image
Jonathan BROSSARD

VS Code is pretty perfect for our stack, so actually, if I would change my IDE, I still did not find better. About Postam, Insomnia, I do not impose it to my team, but if I want, in repositories, everyone can share API Calls, REST Client is perfect and free.

Collapse
 
alevinetx profile image
alevinetx

Two things that made me leave Postman:
1: i signed in to see what the value-add was, only to discover it ingested all of my collections into an online profile that vanished from local storage when I signed out. I was not expecting that, nor was I thrilled.

2: the (then) attitude that postman developers knew better than its users, and added superfluous request headers with no way to remove them.

it sounds like this would never cause #1 to happen. but, what about #2?

Collapse
 
juniormayhe profile image
Junior Mayhé

This is interesting, but I would like to see examples of how to use consume an URL (either with Get or Post), grab its JSON response to extract a property like a Bearer token and reuse it in subsequent calls. You can also grab any other piece of information from JSON that you might have such as a user ID, username, whatever and reuse them in further calls. Postman can do that. Would REST Client be able to do it?

Collapse
 
jakebrandt profile image
Jake Brandt

Biggest pro in my eyes is natural source control integration! Postman has some truly great potential; but what it has lacked for me is file-level source control. Postman offers Git integration; but it's not within your existing repos - therefore you can't easily pair source code versions with sample HTTP request versions.

Collapse
 
pzelnip profile image
Adam Parkin • Edited

Woah, that's super cool. Have found in the past that saved Postman collections are kinda awkward to deal with in a team environment, but with this one could create a saved collection of requests, and then commit that to source control to share. If any of the requests change you just update that file.

Seems to me too it wouldn't be super hard to generate a Postman collection from a file that REST Client uses, so for those teammates that don't use VS Code for whatever reason, you could still have them generate an equivalent collection to use in Postman.

Collapse
 
katafrakt profile image
Paweł Świątkowski

Cool, I didn't know that. One problem I see: we were able to teach some of our non-programmers colleagues to use Postman to some extent. But I don't see them learning how to use VSCode for that ;)

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Yes you're right. But pretty okay here because the purpose is to share API calls between developers team :)

Collapse
 
mostafiz93 profile image
Mostafiz Rahman

It's great to call REST requests from VSCode. I've just tried and it worked well with a limitation. In the response panel it only shows a single response(response to the last request) although there are multiple requests in the .http file.

Collapse
 
hyde_stevenson profile image
[mastodon] Hyde Stevenson

And for those using vim, you can use something like this :

github.com/diepm/vim-rest-console :)

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Thanks a lot @hyde_stevenson :)

Collapse
 
hyde_stevenson profile image
[mastodon] Hyde Stevenson

You're welcome :)

 
guneyozsan profile image
Guney Ozsan

Actually unused RAM is wasted RAM. This stil doesn’t not explain slowness of Postman.

Thread Thread
 
victoryarema profile image
Victor Yarema • Edited

Usually people treat RAM that is being used by OS for permanent storage data cache as free. That is just soo wrong.

Collapse
 
gergelypolonkai profile image
Gergely Polonkai

We could easily use it if this add-on would be compatible with restclient.el (an Emacs package with a similar purpose), as both editors are widely used at our company. But in this way, it’s just another way to do the same thing…

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

We do not want create a standard... just show an easy way to share infos between colleagues ;)

Collapse
 
elenadotnet profile image
Elena.NET

sounds good, thanks!

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Thanks @beelzenef !

Collapse
 
leob profile image
leob • Edited

Fantastic, most of the time I reach for curl (rather than Postman etc) to do this kind of thing, but this looks great, and potentially easier than curl

Collapse
 
swiknaba profile image
Lud • Edited

I usually like having to use less tools, but I disagree for one reason: text editors are a very personal choice, plus this choice changes from time to time (I've been through many different text editors). So this will lock you and the entire team in one text editor.

Besides, you can also export your postman collection into one json file and put that in version control, no need for the payed plan. Other tools (insomnia) are able to import that => maybe it's compatible with VS code? That'll be nice.

I would not (easily) join a team, that forces me to use one particular text editor ;)

If you really want to cut tools, how about curl?

You can also auto-generate a OAS3 compliant API documentation, which you can use to, well, have a documentation, and also use it with curl. Or render it in the browser and build a little UI that allows you to fire requests from your browser. Serve that documentation file from your server, and also the frontenders can render the UI to make requests without having to run the API on their local machine.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

I understand your point.

Export Postman collection exposes you as the fact that you always need to do that (Postman don't auto save into your repo) and it's pretty boring.

The main point here is to be able to maintain it into a repo, without need another tool. It could be a shell script which make cURLs... but can be a pain in the @$$ to get all available features you'll find with REST Client, into a simple shell script.

I fully understand your point about the IDE. Really. In my case, I use during many years Emacs, then Sublime Text, and did not want to get a big IDE. But I opened VS Code and many others, and check the time saved ... based on our tech stack, currently VS Code seems to be the best choice.

I we would to have a final word, we could say that the better world is a .yml file to get a swagger

Collapse
 
renodesper profile image
Boy Sandy G. A.

One think that I really like about postman/similar app is the history. Trying a different authentication/query params/payload will be hard if we have to constantly undo and redo the changes.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Yeah, agree ! History is a great feature !

Collapse
 
jayrald07 profile image
Jayrald Empino

Nah! I'll go with Postman. It has a great features for sending and receiving a response. But, thanks for sharing, maybe I will use that in some situation.

Collapse
 
crisdan1905 profile image
Cristian Danilo Gutiérrez

Great article, I'm only confused about how to set environments. I can't find any guide to set environments (not even in the extension documentation). Can someone help me please???

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Hi @crisdan1905 ,

Don't you find more info event under "Environments and custom/system variables support" section in marketplace.visualstudio.com/items... page ?

Jon

Collapse
 
crisdan1905 profile image
Cristian Danilo Gutiérrez • Edited

Hi Jon, it's just that I hadn't worked with environment variables before on VSCode, so I had no idea how to create an environment file and VSCode documentation about it was a bit confusing to me. Finally, I figured it out in another guide. It may be useful to explain how to create the file in your documentation :)

Great tool by the way, I just loved it and will keep using it

Collapse
 
raja_anbazhagan profile image
Raja Anbazhagan

I'm reminded of this feature from IntelliJ IDEA.

jetbrains.com/help/idea/http-clien...

Collapse
 
machineroom profile image
James

curl. That's all.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

😄

Collapse
 
peterkulik profile image
peterkulik

Http and rest files are also supported in jetbrains IDEs. jetbrains.com/help/rider/Http_clie...

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Great ! It could be usefull for @alejandrorios I guess

Collapse
 
davidrock profile image
David Rock

Insomnia.

Collapse
 
xcixor profile image
Peter Ndungu

This is so sweet, less switching workspaces, more coding

Collapse
 
offero profile image
Chris

Love REST client!

Collapse
 
princebillygk profile image
Prince Billy Graham Karmoker

I still love postman. It have some other features too 😄

Collapse
 
jaakidup profile image
Jaaki

Been using it for a while now and I must say it very convenient having your tests right there.
It’s also simple and quick to use.

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

🙂

Collapse
 
alexkapustin profile image
Oleksandr • Edited

imgs.xkcd.com/comics/standards.png

Why file? Why don't use already existing standards ? For example: swagger.io/docs/specification/about/

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

I fully understand your points, but REST Client have some interesting features like requests sequences, variables handling and it's easier to edit and click to play request on the same file that update your yaml and then execute the swagger.

REST Client, in my point of view, is NOT an OTHER NEW standard, just a cool tool to ease team work.
It's not a way to replace a swagger, and it wasn't my point :)

Collapse
 
alexkapustin profile image
Oleksandr

Are you planning to have functionality to have collections? Basically saying, saved request interfaces and ability to import from swagger/openapi/soap/etc ?

Collapse
 
adisreyaj profile image
Adithya Sreyaj

I have recently discovered this extension and have fallen in love with it.

I now use it for all of my development works. It is such a great extension.

Collapse
 
meidikawardana profile image
meidikawardana

this will be very helpful if this can replace postman i.e all postman can do this extension can do too.
do this extension also support multipart requests?

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD
Collapse
 
nikilragav profile image
NikilRagav

Where do you put the config with the "environment variables"?

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

One link is better than 1 000 words :) marketplace.visualstudio.com/items...

Collapse
 
faridos profile image
faridos

Niiice!

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Thanks @faridos :)

Collapse
 
bilalelreda profile image
Bilal Elreda

Thanks for sharing.

Collapse
 
marwaneb profile image
Marwan El Boussarghini

We have been using this extension in our project for the last 1year and a half and it works really well 👍🏽
It's also a very light way to document your endpoints.
Thanks for sharing 💯

Collapse
 
monaye profile image
Monaye Win

Since Postman free plan will archive your collection (community.postman.com/t/how-do-i-g...), this is great way to share the API with the team!! Nice!!

Collapse
 
giorgosk profile image
Giorgos Kontopoulos 👀 • Edited

Great extension will give it a try.

Here is another alternative that I am using httpie.org/

Here is a comparison with postman konghq.com/blog/postman-httpie-tes...

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

Sound great !!! Thanks @giorgosk

Collapse
 
tjaj profile image
TJ

For linux users we don't need any rest client because cURL is more easy

Collapse
 
jubotho profile image
Светослав Митов

There's curl for windows too, but rest client is quite different thing in a team development perspective

Collapse
 
anoobis profile image
Anubis

Meh, it's just different. Postman is good and it's simply doing its job. I can't see any reason I should migrate.

Collapse
 
davidhopkins profile image
davidhopkins • Edited

Very important to be able to integrate API calls like these into your test pipelines -- so does it work-with/replace Newman?

Collapse
 
karlkras profile image
Karl Krasnowsky

Yeah, but this is vs code dependent. Deal breaker.

Collapse
 
shivuslr41 profile image
§#î\/û

Great extension!! what about streaming data. Does it support websocket?

Collapse
 
lcarbonaro profile image
Les Carbonaro

I've been using the REST Client VSCode extension for over a year now, but this is the first time I'm seeing such an in-depth look into the various config options. Thanks.

Collapse
 
icealgagan profile image
Iceal Gagan

Wow, will try this out

Collapse
 
monisnapjonathan profile image
Jonathan BROSSARD

yes but you do not have the ability to have it into your repo without, each time, export it, and 20 times in a day... it's painful