Support the ongoing development of Laravel.io →
posted 3 weeks 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 1 week 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.