Websocket connections with Postman
Asked Answered
A

13

192

I'm using Postman to test an existing REST API. This API calls async functions on the server which return a response over a websocket using StompJS.

Is it possible to connect to the websocket using Postman?

Anemoscope answered 16/2, 2017 at 8:55 Comment(3)
@NishchitDhanani Heads up, your site is down – Tollman
Thanks, @TheEnvironmentalist, Domain changed to firecamp.io – Chirrup
This is now possible in Postman - blog.postman.com/postman-supports-websocket-apis – Regime
M
97

Update: May 20, 2021, As of version 8.5.0 - Postman supported WebSocket APIs


Obsolete (original) answer:

This is not possible as of May 2017. There is a request for this if you want to upvote: github.com/postmanlabs/postman-app-support/issues/4009

Mol answered 3/5, 2017 at 8:16 Comment(3)
As of version 8.5.0 - Postman supports WebSocket APIs. The linked Github issue has now been closed. πŸŽ‰ – Regime
@DannyDainton Thank you for your information. I will update my answer. – Mol
@DannyDainton how do you can see on postman about send api call that reply not with a res.send but with a socket.emit? – Pavement
M
65

As the previous comment mentioned you can't do this in Postman. however, I found this Chrome app in the web store. It is very simple, but it's working really well with my local web socket connections.

Smart Websocket Client

Memorialist answered 13/7, 2017 at 17:27 Comment(2)
thanks for the quick solution almost 3 years later why no postman do this? – Dispensary
Thank you @JoshSommer. Easy simple and tool, what I need. – Bergamot
R
31

As of version 8.5.0 - Postman now supports WebSocket requests.

Websockets

More information can be found here:

https://blog.postman.com/postman-supports-websocket-apis/

Short Level Up video tutorial of the current functionality:

https://youtu.be/H-7EZVj9D-k

Regime answered 20/5, 2021 at 13:53 Comment(0)
L
29

It's not possible in Postman yet; But there is a new alternative for Postman, named Postwoman. it's open source and supports realtime Websocket and SSE requests.

Update

It seems they have rebranded Postwoman to Hoppscotch and have improved the Websocket support.

Lenticularis answered 12/12, 2019 at 23:2 Comment(4)
Not usable for requests to localhost yet – Letendre
127.0.0.1 works for now but local network calls like 192.168.x.x doesn't work. – Lenticularis
unfortunately it doesn't allow you to save requests/messages like Postman does – Pisano
Thanks! It is useful. – Nordin
Q
29

Postman doesn't support it, but WebSocket King does.

enter image description here

Quietly answered 31/12, 2019 at 11:20 Comment(1)
There is also a Chrome extension if you fancy that. – Pompei
K
13

I've run into this issue often enough that I finally created my own barebones GUI for testing websockets. It's called Socket Wrench, it supports

  • multiple concurrent connections to servers (with all responses and connections displayed in the same view),
  • comprehensive message history to enable easy re-use of messages, and
  • custom headers for the initial connection request.

It's available for Mac OS X, Windows and Linux and you can get it from here.

Kirghiz answered 5/3, 2019 at 8:23 Comment(5)
Looks like an interesting project. I'm hitting some errors; I'll follow up with a GitHub issue. – Losing
@EmmanuelMahuni Could you please open a Github issue with steps to reproduce? – Kirghiz
not bad... i like it. wish there was a way to save the output and the json preview is worse than the text preview. the json should be pretty and the rest should be.. well text – Dispensary
very good project. nice work... needs just a couple improvements – Dispensary
@ChristianMatthew Please open a Github issue on the project, I'll look into implementing it soon :) – Kirghiz
W
11

You can use the tool APIC available here https://chrome.google.com/webstore/detail/apic-complete-api-solutio/ggnhohnkfcpcanfekomdkjffnfcjnjam. This tool allows you to test websocket which use either StompJS or native Websocket. More info here at www.apic.app

Willams answered 18/9, 2017 at 6:24 Comment(4)
Great! but It is beta yet. I an waiting for release. – Abstriction
That myapic.com url appears to have expired and been taken over by an ad squatter. Looks like they currently use apic.app instead – Willtrude
@Abstriction It seems that it is not beta anymore – Bubalo
Yes, It is great – Abstriction
P
6

I ran into the exact same problem. Had to make a Web Socket call. I was able to accomplish this using Advanced Rest Client. I'm using ARC version : 12.1.3

enter image description here

Panslavism answered 11/7, 2018 at 18:27 Comment(3)
No way to customize anything on the WS request though, just an address field! – Pallette
I'm stuck with same problem. I need to set custom headers on connect request, but looks like it's impossible for now – Lindgren
@DubNazar If you're still interested, you could use Socket Wrench – Kirghiz
M
4

Postman currently does not support that.

You can use the online tool at: https://www.piesocket.com/websocket-tester

Montoya answered 26/11, 2019 at 23:9 Comment(0)
F
3

Postman doesn't support websocket. Most of the extension and app I had ever seen were not working properly.

Solution which I found

Just login/ open your application in your browser, and open browser console. Then enter your socket event, and press enter.

socket.emit("event_name", {"id":"123"}, (res)=>{console.log(res); });

enter image description here

France answered 5/2, 2020 at 9:29 Comment(0)
V
2

You can use Socket.io tester, this app lets you connect to a socket.io server and subscribe to a certain topic and/or lets you send socket messages to the server

Vann answered 28/3, 2019 at 12:46 Comment(2)
this is not what the op is looking for at all – Dispensary
This does not connect on localhost – Pipit
L
2

Use Firecamp , support websocket(Socketio & Ws ) ,Rest, Graphql , You can install in your système or use plugin https://firecamp.io/ enter image description here

Langobard answered 23/5, 2021 at 14:52 Comment(0)
O
2

Have not discovered that postman released web sockets function, but in any case i recently wrote my own simple very simple utility with pure js & html (no bootstrap, no npm, no heavy libs), maybe it would be useful for someone: https://github.com/Wissance/wstester

Overcast answered 24/5, 2021 at 18:33 Comment(0)

© 2022 - 2024 β€” McMap. All rights reserved.