You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`rh` is a CLI tool for creating an ephemeral endpoint for testing and inspecting requests from your application or webhook.
7
8
9
+
<imgwidth="1136"alt="Request Hole CLI web ui"src="https://user-images.githubusercontent.com/100900/125158715-9b866500-e10e-11eb-9438-36d0f8325c60.png">
--log string writes incoming requests to the specified log file (example: --log rh.log)
49
51
-p, --port int sets the port for the endpoint (default 8080)
50
52
-r, --response_code int sets the response code (default 200)
53
+
--web runs a web server to show incoming requests
54
+
--web_port int sets the port for the web server (default 8081)
51
55
52
56
Use "rh [command] --help" for more information about a command.
53
57
```
58
+
## Using the Web UI
59
+
### Create an HTTP endpoint
60
+
```
61
+
$ rh http --web
62
+
```
63
+
This option will open a web UI that will display the incoming requests. Incoming requests will render live in the browser when they are received.
54
64
65
+
<imgwidth="1136"alt="Request Hole CLI web ui"src="https://user-images.githubusercontent.com/100900/125158715-9b866500-e10e-11eb-9438-36d0f8325c60.png">
66
+
67
+
## Using the CLI
55
68
### Creating an HTTP endpoint
56
69
To create an http endpoint with default settings (port 8080, return status code 200):
Sometimes we need to expose `rh` to the internet to test applications or webhooks from outside of our local dev env. The best way to do this is to use a tunneling service such as [ngrok](https://ngrok.com).
78
91
```
79
92
$ ngrok http 3001
80
93
$ rh http -p 3001
81
94
```
95
+
96
+
## Running Tests and Building
97
+
It is recommended to run the JS build first so that the Go build can embed the latest web UI build.
0 commit comments