C.W.K.
Stream
Lesson 03 of 06 · published

httpie / Postman / Insomnia — The Tools You'll Actually Reach For

~9 min · production, httpie, postman, insomnia, gui-clients

Level 0HTTP Newbie
0 XP0/46 lessons0/12 achievements
0/120 XP to next level120 XP to go0% complete
"curl is for X-raying one request. For exploring an API, saving requests, building collections, sharing with a team, you reach for friendlier tools. Three are worth knowing."

httpie — curl with Better Defaults

httpie is a curl alternative with sane defaults for JSON APIs. JSON is the default body format; pretty-printing is on; colorized output by default. Same install once via brew/pip; immediately usable.

# httpie equivalent of curl POST + JSON
http POST https://api.example.com/users name=Pippa email=pippa@example.com

# Auth + headers + JSON body
http POST https://api.example.com/users \
  Authorization:'Bearer abc' \
  Content-Type:'application/json' \
  name=Pippa

# GET with query params
http GET https://api.example.com/users role==admin status==active

Notice the syntax: key=value is a JSON body field; key==value is a query parameter; Header:value is a header. Easier to remember than curl's flag soup for ad-hoc work.

Postman — The Team API Workbench

Postman is the elephant: a desktop/web/CLI client that builds collections of requests, parameterized by environment variables, shareable across teams, runnable as automated tests. The headline features:

  • Collections — folders of related requests with shared auth and variables.
  • Environments — variable sets ({{base_url}}, {{token}}) you swap when targeting dev / staging / prod.
  • Tests — JavaScript snippets that assert on the response (status code, body shape). Run as automated CI test suites via Newman (Postman's CLI).
  • Mock servers — generate a stub server from an OpenAPI spec or collection.
  • Documentation — auto-generate API docs from collections.

Used by integration teams, QA, and developers exploring third-party APIs. Free tier covers most personal use; team plans add collaboration features.

Insomnia — The Quieter Alternative

Insomnia is Postman's leaner sibling: same collection model, same environment variables, same tests, simpler UI. Open-source core (Kong acquired the company but kept Insomnia open). If Postman feels heavy, Insomnia is the swap.

Distinguishing features:

  • Built-in GraphQL support (query editor with schema introspection).
  • gRPC support (calls native gRPC services from the GUI).
  • OpenAPI/Swagger import to bootstrap collections.
  • Plugin ecosystem for custom auth schemes.

The Bridge Pattern: Save in GUI, Run in CI

The common workflow: explore an API interactively in Postman/Insomnia, save the working requests into a collection, then run that collection as an automated test in CI via Newman (Postman) or Inso CLI (Insomnia). Same requests; different runtime. This is how teams move from "works on my machine" to "works in CI."

curl for X-raying one wire; httpie for ad-hoc JSON; Postman/Insomnia for collections and team flow. Use the lightest tool that fits the task. The mistake is using Postman for one-off curl jobs (overkill) or curl for collection management (under-tooled).

cwkPippa's Tooling

cwkPippa development uses curl for everything ad-hoc — single-user dev, no need for collection management. FastAPI's auto-generated Swagger UI at /docs serves as a built-in browser-based API explorer (you click endpoints, fill forms, see live responses) without needing Postman. cwk-site uses Postman in CI for integration tests against the Supabase + Vercel stack — Newman runs the collection on every PR build, blocking merge on test failures. Different tools for different stages.

Code

httpie — JSON-first, simpler syntax than curl·bash
# httpie cheat sheet (compare to curl)

# Install once
brew install httpie  # or pip install httpie

# GET with query params
http GET https://api.example.com/users role==admin

# POST JSON (auto-detected)
http POST https://api.example.com/users name=Pippa email=pippa@example.com

# Custom header (colon, not -H)
http GET https://api.example.com/me Authorization:'Bearer abc'

# Send a raw body from stdin
echo '{"name":"Pippa"}' | http POST https://api.example.com/users

# Download a binary
http --download https://example.com/file.zip
Postman: JavaScript test snippets + variable chaining·javascript
// Postman test snippet — assert on a response
pm.test('returns 200', () => {
  pm.response.to.have.status(200);
});

pm.test('body has user id', () => {
  const body = pm.response.json();
  pm.expect(body.id).to.be.a('string');
  pm.expect(body.id).to.match(/^u_/);
});

pm.test('response time under 500ms', () => {
  pm.expect(pm.response.responseTime).to.be.below(500);
});

// Postman variables for chaining requests
const id = pm.response.json().id;
pm.environment.set('last_user_id', id);  // available in next request as {{last_user_id}}
Newman: same Postman collection, runs in CI·bash
# Newman — Postman collection in CI
npm install -g newman
newman run my-collection.postman_collection.json \
  --environment production.postman_environment.json \
  --reporters cli,junit \
  --reporter-junit-export results.xml

# CI uses results.xml to surface test pass/fail.
# Same requests you ran interactively are now an automated test gate.

External links

Exercise

Install httpie (brew install httpie). Pick three curl commands you commonly use and rewrite them in httpie syntax. Compare readability. Then, if you have any FastAPI app, open its /docs endpoint and use the 'Try it out' button for one POST endpoint — feel how the auto-generated Swagger UI replaces most of what Postman would do for personal exploration. Bonus: install Postman or Insomnia, create a collection of 3-5 requests with environment variables for {{base_url}} and {{token}}, swap between dev and prod environments without editing each request.
Hint
httpie's biggest win is JSON: name=Pippa age:=25 becomes {"name":"Pippa","age":25} automatically. The := syntax tells httpie the value is a non-string. FastAPI's /docs is the killer feature most projects underuse — every developer who builds a FastAPI service gets a Postman-shaped tool for free. Variables in Postman/Insomnia let you parameterize requests; swapping environments is one click.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.