Support the ongoing development of Laravel.io →
posted 1 month ago
API
1

For terminal-based API testing with Laravel, a few tools come up a lot:

HTTPie — Probably the most popular pick for quick manual testing. Much friendlier syntax than raw curl, with JSON formatting, syntax highlighting, and easy header/auth handling out of the box.

curl — Still the classic. No install needed, works everywhere, great for CI scripts or quick one-off checks, though the syntax gets verbose for anything complex.

xh — A Rust-based HTTPie alternative, faster startup and single binary, worth trying if you want something lighter.

Postman CLI (Newman) — If your team already builds collections in Postman's GUI, newman run lets you execute those same collections from the terminal/CI pipeline.

Laravel's own HTTP testing — For testing your own API endpoints as part of your app, Http::fake() combined with Pest or PHPUnit is usually the better long-term approach rather than manual terminal calls, since it's repeatable and runs in CI.

If you're just poking at endpoints during development, HTTPie is the easiest to reach for daily. If you're testing your own Laravel routes as part of the test suite, Pest/PHPUnit with Http::fake() (or $this->getJson() / postJson() for your own controllers) is the more sustainable approach.

What are you testing - third-party APIs, or your own Laravel endpoints?

Last updated by @niketansharma 3 weeks ago.
0

I made a similar transition away from heavy desktop clients about a year ago because maintaining separate Postman collections and local bash scripts was becoming a synchronization nightmare. Newman is the obvious choice if you already have a massive suite of Postman collections, but its dependency on the Node runtime can sometimes complicate lightweight runner environments. If you are leaning toward Apidog CLI, it really excels at bridging that gap because it keeps your specification synchronized automatically. When running these tests in GitHub Actions, the CLI approach lets you spin up parallel containers to test various endpoints simultaneously, allowing for simulated concurrent connections unlimited by the rendering bottlenecks or memory bloat of a desktop app. It makes the feedback loop in your pipeline incredibly tight and reproducible.

Last updated by @stevemmitchelldev 4 days ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

luc lucdev01234-png Joined 27 Jul 2026

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.