Requestkit
Local HTTP request toolkit
Installation
If you have a Ruby environment available, you can install Requestkit globally:
gem install requestkit
Usage
Start the server:
requestkit
This starts Requestkit on http://localhost:4000. Send any HTTP request to test:
curl -X POST http://localhost:4000/stripe/webhook \
-H "Content-Type: application/json" \
-d '{"event": "payment.succeeded", "amount": 2500}'
Open http://localhost:4000 in your browser to see all captured requests with headers and body.
Custom port
requestkit --port 8080
Persistent storage
By default, requests are stored in memory and cleared when you stop the server. Use file storage to persist across restarts:
requestkit --storage file
Requests are saved to ~/.config/requestkit/requestkit.db.
Custom database path
requestkit --storage file --database-path ./my-project.db
Configuration
Create a configuration file to set defaults:
User-wide settings (~/.config/requestkit/config.yml):
port: 5000
storage: file
Project-specific settings (./.requestkit.yml):
storage: memory
default_namespace: my-rails-app
Configuration precedence: CLI flags > project config > user config > defaults
Available options
| Option | Description | Default |
|---|---|---|
port |
Server port | 4000 |
storage |
Storage type: memory or file
|
memory |
database_path |
Database file location | ~/.config/requestkit/requestkit.db |
default_namespace |
Default namespace for root requests | default |
Namespaces
Requestkit automatically organizes requests by namespace using the first path segment:
# Namespace: stripe
curl http://localhost:4000/stripe/payment-webhook
# Namespace: github
curl http://localhost:4000/github/push-event
Filter by namespace in the web UI. Requests to / use the default_namespace from your config.
Sending requests
Create JSON files to send HTTP requests and test your APIs. Requestkit loads request definitions from:
-
./.requestkit/requests/:namespace/:name.json(project-specific) -
~/.config/requestkit/requests/:namespace/name.json(user-wide)
Example: (.requestkit/requests/api/create-user.json):
{
"method": "POST",
"url": "http://localhost:3000/api/users",
"headers": {
"Content-Type": "application/json"
},
"body": "{\"name\": \"John Doe\", \"email\": \"john@example.com\"}"
}
Help
requestkit help
License
Requestkit is released under the MIT License.