Poke My Endpoints - a lightweight tool to hit multiple HTTP endpoints concurrently. Useful for keeping services warm or triggering scheduled jobs.
-
Install dependencies:
go mod tidy
-
Create a
.envfile for any API keys or secrets..env.exampleavailable for reference:cp .env.example .env
Then edit
.envwith your actual API keys. -
Create an
endpoints.jsonfile.example_endpoints.jsonavailable for reference:[ { "name": "Endpoint 1", "url": "https://randomapi.xyz/api/v1/endpoint", "method": "GET" }, { "name": "Endpoint 2", "url": "https://randomapi.io/api/v2/endpoint", "method": "GET", "headers": { "apikey": "API_KEY" } } { "name": "Endpoint 3", "url": "https://randomapi.dev/api/v3/endpoint", "method": "POST", "headers": { "apikey" : "API_KEY"}, "payload": { "email": "EMAIL", "password": "PASSWORD"} } ]
| Field | Required | Description |
|---|---|---|
name |
yes | Label for logging |
url |
yes | Full URL to poke |
method |
yes | HTTP method (GET, POST, etc.) |
headers |
no | Key-value pairs where values are .env var names |
payload |
no | Key-value pairs where values are .env var names |
Header values reference environment variable names, not the actual secrets. This keeps your
endpoints.jsonsafe to commit if desired.
go run main.goOr build and run:
go build -o go-pme && ./go-pme