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?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.