Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Http Class Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy vs. borrow for outbound HTTP. This package sits in a crowded lane already occupied by Guzzle (the de facto PHP standard) and 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?"
  • Dependency footprint and vendor-risk budgeting. With 0 stars, 0 dependents, and no visible community adoption, this is an unvetted, single-maintainer artifact. That is a legitimate input into a dependency policy decision — it tells you this belongs in the "tactical utility, pin and monitor" bucket, not the "platform dependency" bucket.
  • Scope of a scraping/integration feature. The "respond like a browser" framing points at cookie handling, redirects, and header ergonomics — relevant when scoping a lightweight scraping or form-submission feature where full browser automation (Puppeteer/Playwright) is overkill but curl one-liners are too brittle.
  • Testability and interface contracts. Because it is not PSR-18/PSR-7 compliant, adopting it constrains future decisions: you cannot swap in a compliant client later without touching every call site. That is a roadmap decision, made today, cheaply or expensively.
  • Internal tooling vs. production surface. It usefully separates decisions: acceptable for throwaway scripts, migration one-offs, and webhook smoke tests; not acceptable as the transport layer under a customer-facing integration.

When to Consider This Package

Consider it only when all of the following hold:

  • You are on a legacy or non-Composer-managed PHP codebase where pulling in Guzzle's dependency tree is genuinely unwelcome, and you need a handful of GET/POST calls with cookies and redirects.
  • The work is internal, short-lived, or prototype-grade — a migration script, a monitoring probe, a one-off data pull — where the cost of replacing the client later is near zero.
  • You do not need PSR-18/PSR-7 interoperability, PSR-3 logging integration, or mockable transport interfaces for a test suite.
  • You are willing to pin the exact version, vendor/fork it into your own repo, and own the maintenance yourself.

Look elsewhere — specifically at Http:: / Guzzle — when any of these are true:

  • You are on Laravel 7+. The framework client already provides retries, timeouts, pooled concurrency (Http::pool), fake()-based test doubles, middleware, and event hooks. Writing anything custom here is strictly negative ROI.
  • Reliability matters. No retry/backoff policy, no connection pooling story, and no clear timeout semantics are disqualifying for anything on a critical path.
  • You need concurrency. Sequential request handling will not survive a fan-out integration (e.g., syncing 5,000 records against a third-party API).
  • Compliance or audit applies. An unmaintained, zero-adoption dependency is a poor answer in a security review, regardless of code quality.
  • You need streaming, multipart uploads at scale, HTTP/2, or granular TLS control. Reach for Guzzle or a dedicated client.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core