delight-im/http
A lightweight, framework-agnostic HTTP utility library for PHP. It provides simple objects for requests, responses, URLs, and headers, plus helpers for methods, status codes, and content types, so you can read and build HTTP messages in any PHP application.
422 for validation, 409 for conflicts) across services, SDKs, and docs — a decision that otherwise drifts team by team.Symfony\Component\HttpFoundation\Response, PSR-7/PSR-17 implementations). Recommend "copy or vendor" over "depend on."429/503 + Retry-After), and idempotency headers — which directly affects SDK ergonomics and support load.Consider it when:
Look elsewhere when:
HttpFoundation/symfony/http-foundation and native constants; adding a parallel vocabulary creates two sources of truth.guzzlehttp/psr7, laminas-diactoros, symfony/http-client.Executive summary. A micro-library (MIT) that names HTTP status codes, methods, and headers for PHP. It is not a client, framework, or platform — it is vocabulary. Cost is negligible; risk is supply-chain, not licensing.
Recommendation. Treat it as a reference and convenience layer, not a dependency of record. Vendor the constants or wrap them behind our own enum/interface, so we get consistency without coupling to an unmaintained package.
Why it matters (business). Inconsistent status codes and header conventions are a recurring source of client bugs, SDK churn, and support tickets. A shared vocabulary is a cheap, durable fix that compounds as we add endpoints — and it makes API style guides enforceable rather than aspirational.
For engineering. Removes magic numbers, gives one place to review HTTP semantics, and is trivial to fork or inline (≈constants only). Adopt behind an internal interface and pin/vendor it; treat upstream as read-only reference.
Caveats to state openly. Low adoption (18 stars, 0 dependents, score 0.21) means no community backstop. Do not adopt it where framework-native constants or PSR-7 already exist, and do not let it become the reason we skip a real HTTP abstraction when we need one.
How can I help you explore Laravel packages today?