189

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?

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
Mr. Martini
  • 2,057
  • 3
  • 13
  • 9

13 Answers13

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

T.Todua
  • 53,146
  • 19
  • 236
  • 237
kien bui
  • 1,760
  • 2
  • 17
  • 33
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

JoshSommer
  • 2,550
  • 18
  • 23
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.

Mohammad Rafigh
  • 757
  • 9
  • 17
29

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

enter image description here

Tom
  • 950
  • 3
  • 15
  • 27
  • 1
    There is also a [Chrome extension](https://chrome.google.com/webstore/detail/websocket-king-client/cbcbkhdmedgianpaifchdaddpnmgnknn/related?hl=en) if you fancy that. – Sal Alturaigi Apr 07 '21 at 10:30
29

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

Danny Dainton
  • 23,069
  • 6
  • 67
  • 80
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.

asleepysamurai
  • 1,362
  • 2
  • 14
  • 23
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

BiJ
  • 1,639
  • 5
  • 24
  • 55
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

John
  • 2,445
  • 2
  • 17
  • 25
  • 4
    No way to customize anything on the WS request though, just an address field! – caesarsol Jul 20 '18 at 18:00
  • I'm stuck with same problem. I need to set custom headers on connect request, but looks like it's impossible for now – Dub Nazar Sep 11 '18 at 20:38
  • 2
    @DubNazar If you're still interested, you could use [Socket Wrench](https://asleepysamurai.com/articles/socketwrench?ref=stackoverflow/42269075) – asleepysamurai Mar 05 '19 at 08:20
4

Postman currently does not support that.

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

Anand Singh
  • 1,091
  • 13
  • 21
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

Mahfuzur Rahman
  • 1,497
  • 18
  • 23
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

Amine Harbaoui
  • 1,247
  • 2
  • 17
  • 34
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

1

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

Michael Ushakov
  • 1,639
  • 1
  • 10
  • 18