API tester and debugger for your CLI
Find a file
2024-10-19 22:02:18 +02:00
src fix: extract html responses 2024-10-19 22:02:18 +02:00
.editorconfig chore: initial commit 2023-05-21 18:35:03 +02:00
.gitignore chore: initial commit 2023-05-21 18:35:03 +02:00
.rustfmt.toml chore: initial commit 2023-05-21 18:35:03 +02:00
Cargo.lock chore: swap JQL for JAQ: it's more similar to jq 2024-10-19 21:44:05 +02:00
Cargo.toml chore: swap JQL for JAQ: it's more similar to jq 2024-10-19 21:44:05 +02:00
postwoman.toml feat: allow expecting status codes 2024-10-19 22:02:05 +02:00
README.md feat: starting from scratch 2024-10-19 03:28:16 +02:00

PostWoman

A CLI api tester and request builder, totally not born out of frustration from some other tool...

Why

I'd much rather edit my test routes in my text editor as bare config files and fire them via a CLI than fumble around some GUI application.

Usage

postwoman expects a postwoman.toml collection in your cwd. A different file or path can be specified with the global -c option.

Use postwoman run <filter> to send requests to all routes in current config matching given filter (regex). Use . as filter to run all.

Examples

A collection can be super simple

[route.test]
url = "https://api.alemi.dev/debug"

But more complex options are available

[client]
user_agent = "api-tester@alemi.dev"

[route.debug]
url = "https://api.alemi.dev/debug"
method = "PUT"
headers = ["Content-Type: application/json"]
body = { hello = "world!", success = true }
extract = { type = "body" }

[route.cookie]
url = "https://api.alemi.dev/getcookie"
method = "GET"
headers = [
	"Authorization: Basic ...",
	"Accept: application/json"
]
extract = { type = "header", key = "Set-Cookie" }