Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hashrocket/ws
websocket command line tool
https://github.com/hashrocket/ws
Last synced: about 1 month ago
JSON representation
websocket command line tool
- Host: GitHub
- URL: https://github.com/hashrocket/ws
- Owner: hashrocket
- License: mit
- Created: 2016-08-31T21:16:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-08T14:04:35.000Z (over 1 year ago)
- Last Synced: 2024-02-13T20:31:47.509Z (5 months ago)
- Language: Go
- Size: 1.11 MB
- Stars: 412
- Watchers: 11
- Forks: 71
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-websockets - ws - websocket command line tool. (Command-Line Interface (CLI) Tools / Protocols and APIs)
- awesome-stars - ws
- awesome-websockets - ws - websocket command line tool. (Command-Line Interface (CLI) Tools / Protocols and APIs)
- awesome-stars - ws
- awesome-starred - hashrocket/ws - websocket command line tool (others)
README
# ws
ws is a simple command line websocket client designed for exploring and debugging websocket servers. ws includes readline-style keyboard shortcuts, persistent history, and colorization.
![Example usage recording](https://hashrocket-production.s3.amazonaws.com/uploads/blog/misc/ws/ws.gif)
## Installation
```
go get -u github.com/hashrocket/ws
```## Usage
Simply run ws with the destination URL. For security some sites check the origin header. ws will automatically send the destination URL as the origin. If this doesn't work you can specify it directly with the `--origin` parameter.
```
$ ws ws://localhost:3000/ws
> {"type": "echo", "payload": "Hello, world"}
< {"type":"echo","payload":"Hello, world"}
> {"type": "broadcast", "payload": "Hello, world"}
< {"type":"broadcast","payload":"Hello, world"}
< {"type":"broadcastResult","payload":"Hello, world","listenerCount":1}
> ^D
EOF
```