Skip to content

Commit d7f533d

Browse files
authored
Update README with WebSocket info
1 parent 1827e22 commit d7f533d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![JS Tests](https://github.com/aaronvb/request_hole/workflows/Test%20JS/badge.svg)](https://github.com/aaronvb/request_hole/actions/workflows/test_js.yml)
55
[![Builds](https://github.com/aaronvb/request_hole/workflows/Builds/badge.svg)](https://github.com/aaronvb/request_hole/actions/workflows/builds.yml)
66

7-
`rh` is a CLI tool for creating an ephemeral endpoint for testing and inspecting requests from your application or webhook.
7+
`rh` is a CLI tool for creating an ephemeral endpoint for testing and inspecting HTTP requests, WebSocket connections, and WebSocket messages from your application or webhook.
88

99
<img width="1136" alt="Request Hole CLI web ui" src="https://user-images.githubusercontent.com/100900/125158715-9b866500-e10e-11eb-9438-36d0f8325c60.png">
1010

@@ -41,6 +41,7 @@ Available Commands:
4141
help Help about any command
4242
http Creates an http endpoint
4343
version Print version number of Request Hole
44+
ws Creates a websocket endpoint
4445
4546
Flags:
4647
-a, --address string sets the address for the endpoint (default "localhost")
@@ -64,6 +65,14 @@ This option will open a web UI that will display the incoming requests. Incoming
6465

6566
<img width="1136" alt="Request Hole CLI web ui" src="https://user-images.githubusercontent.com/100900/125158715-9b866500-e10e-11eb-9438-36d0f8325c60.png">
6667

68+
### Create a WebSocket endpoint
69+
```
70+
$ rh ws --web
71+
```
72+
This option will open a web UI that will display the WebSocket connections and incoming messages. Connections and incoming messages will render live in the browser when they are received.
73+
74+
<img width="1375" alt="Screen Shot 2021-11-05 at 15 03 31" src="https://user-images.githubusercontent.com/100900/140592650-fa8aa3d4-41b7-4c2f-9a2b-b81e1bbed575.png">
75+
6776
## Using the CLI
6877
### Creating an HTTP endpoint
6978
To create an http endpoint with default settings (port 8080, return status code 200):
@@ -72,6 +81,13 @@ $ rh http
7281
```
7382
<img width="785" alt="Request Hole CLI http" src="https://user-images.githubusercontent.com/100900/120266278-474db280-c23d-11eb-9e1f-4d73d18522d5.png">
7483

84+
### Creating a WebSocket endpoint
85+
To create a WebSocket endpoint with default settings (port 8080):
86+
```
87+
$ rh ws
88+
```
89+
<img width="784" alt="Request Hole CLI WebSocket" src="https://user-images.githubusercontent.com/100900/140592519-a965af54-a0a3-44cd-be55-1401c8925590.png">
90+
7591
### Show header details
7692
This option shows all the header details in the incoming request.
7793
```

0 commit comments

Comments
 (0)