pdeans/http
Lightweight PSR-7 cURL HTTP client with PSR-17 factory support, built on Laminas Diactoros. Configure via curl options and use helper methods for GET/POST/PUT/PATCH/DELETE/HEAD/TRACE with headers and optional body streams/resources.
curl_exec() calls or integrating with third-party libraries expecting PSR-7 messages.HttpClient facade, Eloquent/Queue middleware). However, its PSR-7 compliance allows it to coexist with Laravel’s native HTTP client or be wrapped in a Laravel-specific service layer.RequestFactory, StreamFactory) can be registered in Laravel’s service container, enabling dependency injection for HTTP message creation in controllers/services.HttpClient? The latter may require a facade or service layer.curl_exec() calls or supplement Laravel’s HttpClient for use cases needing fine-grained cURL control.Http facade, MockHttp).curl_exec() call with the package’s client (e.g., in a service handling third-party API calls).HttpClient) to wrap the package, providing Laravel-centric methods (e.g., withQueue(), withTimeout()) while delegating to the underlying client.RequestFactory, StreamFactory) in Laravel’s service container for dependency injection:
$this->app->bind(
Psr\Http\Message\RequestFactoryInterface::class,
pdeans\Http\Factories\RequestFactory::class
);
HttpClient or replace it for specific use cases (e.g., where cURL options are critical).Psr\Http\Message\ResponseInterface).php-http/message or Laravel’s middleware stack).curl --verbose), but PSR-7/PSR-17 debugging may require familiarity with interfaces.CURLOPT_SHARE in cURL).release() method).getStatusCode() and getBody()).respect/validation).release()) can lead to memory leaks. Use context managers or Laravel’s service container to ensure cleanup.RequestInterface, ResponseInterface).// Laravel Service Provider
$this->
How can I help you explore Laravel packages today?