Websocket connections with postman

2019-03-22 09:51发布

问题:

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?

回答1:

This is not possible as of May 2017, because Postman only works with HTTP methods such as POST, GET, PUT, DELETE.

P/S: There is a request for this if you want to upvote: github.com/postmanlabs/postman-app-support/issues/4009



回答2:

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



回答3:

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.myapic.com



回答4:

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



回答5:

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.



标签: postman