Weave Code
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

Buzz Laravel Package

kriswallsmith/buzz

Lightweight PHP HTTP client (PSR-7/PSR-17) for scripted requests. Includes FileGetContents, Curl and MultiCurl clients with batch requests and HTTP/2 server push support. Simple Browser API or low-level request sending.

View on GitHub
Deep Wiki
Context7

PHP's lightweight HTTP client

Frequently asked questions about Buzz
Is kriswallsmith/buzz a good alternative to Guzzle for Laravel HTTP requests?
Buzz is ideal if you need a lightweight, PSR-7 compliant client without Guzzle’s overhead. It’s perfect for simple requests, scraping, or HTTP/2 server push, but lacks Guzzle’s async support and active development. Laravel’s built-in `Http` facade (Guzzle-based) may suffice for most cases.
How do I install Buzz in a Laravel project?
Run `composer require kriswallsmith/buzz` and install a PSR-17 factory like `nyholm/psr7` (`composer require nyholm/psr7`). Buzz requires this dependency to create PSR-7 requests/responses. No Laravel-specific setup is needed unless you build a custom wrapper.
Which Buzz client should I use for Laravel: FileGetContents, Curl, or MultiCurl?
Use **Curl** for most cases (balanced performance and features). **FileGetContents** is simplest but blocking; **MultiCurl** is fastest for batch requests or HTTP/2 server push (e.g., asset preloading). Avoid MultiCurl if you don’t need its advanced features.
Does Buzz support Laravel’s middleware stack (e.g., auth, logging)?
Yes, Buzz supports middleware via its `Browser` class. You can chain middleware like `BasicAuthMiddleware` or `LoggerMiddleware`, but you’ll need to manually map Laravel’s global middleware (e.g., `Http::withToken()`) to Buzz’s equivalents.
Is Buzz compatible with Laravel 10+ and PHP 8.1+?
Yes, Buzz supports PHP 8.1+ and Symfony 8, which aligns with Laravel 10+. It’s feature-complete (since v1.0) with no breaking changes, but long-term maintenance depends on community adoption. Test thoroughly if using legacy code with deprecated methods.
Can I use Buzz for HTTP/2 server push in Laravel?
Yes, Buzz’s **MultiCurl** client supports HTTP/2 server push, useful for preloading assets or performance-critical APIs. Enable it by configuring the client with HTTP/2 support, but note this requires PHP’s `curl` extension with HTTP/2 enabled.
How do I integrate Buzz with Laravel’s Http facade (e.g., replace Guzzle)?
Buzz doesn’t natively integrate with Laravel’s `Http` facade, but you can create a wrapper service provider or facade (e.g., `Buzz::get($url)`) to mimic Guzzle’s API. Alternatively, use Buzz directly in services/controllers with PSR-17 factories.
What are the performance trade-offs between Buzz’s clients?
**FileGetContents** is simplest but blocking and slow for multiple requests. **Curl** is faster with connection pooling and supports middleware. **MultiCurl** is fastest for batch requests (e.g., scraping) but complex to configure. Benchmark your use case.
Does Buzz support async requests like Symfony’s HttpClient?
No, Buzz is synchronous-only. For async requests, consider Symfony’s `HttpClient` (uses ReactPHP) or Guzzle’s promises. Buzz’s **MultiCurl** can batch requests concurrently but doesn’t return promises or futures.
How do I handle cookies or redirects with Buzz in Laravel?
Buzz’s `Browser` class handles cookies and redirects automatically. For Laravel, store cookies in a session or use middleware to pass them between requests. Example: `$browser->setCookieJar(new CookieJar())` to persist cookies across requests.
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.
yandex/translate-api
voku/simple_html_dom
league/flysystem-vfs
bkwld/upchuck
filament/spatie-laravel-tags-plugin
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php