ptcong/php-http-class
A lightweight PHP HTTP client class for sending GET and POST requests, managing cookies, custom headers, redirects, and file uploads through a simple API. Drop-in and dependency-free, it fits into any PHP project without extra setup.
Illuminate\Support\Facades\Http (Laravel's first-party wrapper around Guzzle, available since Laravel 7). The real decision it informs is not "should we write our own client" but "do we need anything beyond what the framework already gives us?"curl one-liners are too brittle.Consider it only when all of the following hold:
Look elsewhere — specifically at Http:: / Guzzle — when any of these are true:
Http::pool), fake()-based test doubles, middleware, and event hooks. Writing anything custom here is strictly negative ROI.For executives — the one-paragraph version: We evaluated a small open-source PHP HTTP client as a possible dependency. It is a thin, single-maintainer utility with no measurable adoption (no stars, no downstream dependents) and no standards compliance. Our recommendation is not to adopt it as a platform dependency. Laravel already ships an HTTP client that covers every capability this package offers, plus retries, concurrency, and test mocking — at zero marginal dependency cost and with first-party support. Adopting this package would add supply-chain risk and a future migration to save, at most, a few hours of setup we do not need to spend anyway. We are comfortable with it being used informally in throwaway internal scripts, provided it is version-pinned and never reaches a customer-facing path.
For engineering — the practical framing: Assume this is curl with a friendlier face. If you are already inside Laravel, use Http:: and get fake() in tests, retry(), and pool() for free; there is no scenario where this package is the better call. If you have a genuine edge case — a dependency-hostile legacy app, or a script that must ship as a single file — pin the commit hash, wrap it behind a thin internal interface (HttpTransport::send()), and treat it as replaceable so the PSR-18 migration later is a one-file change rather than a grep across the codebase. Do not let it become the transport under anything with an SLA.
How can I help you explore Laravel packages today?