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

Laravel Http Client Default Options Laravel Package

smokills/laravel-http-client-default-options

A Laravel package for defining default options on the HTTP client, so shared headers, timeouts, and other settings apply automatically to every outgoing request. Configure defaults once and keep API calls clean, consistent, and free of repetition.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Third-party dependency visibility. v2.0.2 enables Laravel HTTP client events, which means every outbound call made through Illuminate\Http\Client can now emit RequestSending, ResponseReceived, and ConnectionFailed events. For a PM, this converts "the vendor integration is broken" into "the vendor was returning 503s between 14:02 and 14:19" — a qualitative shift in how support, success, and engineering triage the same incident.
  • Build vs. buy for observability glue. Teams routinely hand-roll Guzzle middleware or wrapper clients to log outbound requests. If this package now hooks the framework's native event surface, that work becomes configuration plus a listener. That is a clear "buy/adopt" over "build," and it is the single strongest argument in the release note.
  • Roadmap candidates it unlocks. Vendor/partner scorecards (p50/p95 latency and error rate per integration), rate-limit and quota tracking per API key, an audit trail for compliance or contractual reporting, and correlation of customer-reported failures against upstream dependency health. These are cheap to scope once events exist, expensive to scope without them.
  • Reliability and support economics. Faster MTTR on integration incidents, defensible SLOs that include external dependencies, and the ability to answer "was it us or them?" with evidence rather than anecdote.
  • Scope boundary to be explicit about. This release makes outbound calls observable; it does not add retries, circuit breaking, or dashboards. Those remain product decisions you own, and the events are the input to them.

When to Consider This Package

Adopt when:

  • You make outbound HTTP calls to third parties from Laravel and currently have no per-request record of latency, status, or failure mode.
  • You want hooks on Laravel's native HTTP client event system rather than maintaining forked Guzzle middleware.
  • You already run (or plan to run) an event listener, log channel, or metrics sink — the package supplies the signal, not the destination.
  • You are a small team without a funded APM/tracing vendor and want the 80% case at near-zero integration cost.

Look elsewhere when:

  • You need genuine distributed tracing across services. Reach for OpenTelemetry or a commercial APM; event listeners are not a substitute for span propagation.
  • Your traffic is high-volume and you have no sampling or redaction story — naive event logging becomes a storage cost and a PII liability.
  • You call third parties outside Laravel's HTTP client (raw Guzzle, curl, SDKs with their own transport). Coverage will be partial and the gaps will be the ones that bite you.
  • You need durable, guaranteed-delivery audit logging. Events are in-process and synchronous; treat them as telemetry, not as a compliance record.
  • You cannot absorb another dependency for something that may be reimplementable as a ~30-line listener. Worth a spike to check.

How to Pitch It (Stakeholders)

To executives: This is a small, contained change with outsized diagnostic value. Today, when a partner API degrades, we learn about it from customers. With this release we can capture every outbound call we make — timing, status, failure — and route it into whatever logging or monitoring we already have. It costs us a dependency and some configuration, not a project. It also gives us the raw material to hold vendors to their SLAs and to report on integration reliability without commissioning new work.

To engineering: v2.0.2 enables dispatch of Laravel's HTTP client events, so you can register listeners for request/response/failure instead of writing Guzzle middleware or wrapping the client. No breaking changes are called out in this release, but note the package is already on major version 2 — pin the version, read the v2 upgrade notes before adopting, and confirm the event names and payload shape against your Laravel version rather than assuming.

Risks to flag in the same breath: event payloads may contain headers, tokens, or request bodies — agree a redaction policy before enabling in production; decide on sampling and retention before, not after, the log bill arrives; and be honest that this buys observability, not resilience. If the business wants retries, circuit breakers, or a live vendor dashboard, that is a follow-on roadmap item, not something this release delivers.

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.
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules