Download the PHP package cbaconnier/laravel-http-pool-callback without Composer
On this page you can find all versions of the php package cbaconnier/laravel-http-pool-callback. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cbaconnier/laravel-http-pool-callback
More information about cbaconnier/laravel-http-pool-callback
Files in cbaconnier/laravel-http-pool-callback
Package laravel-http-pool-callback
Short Description A Laravel package that enhances the HTTP pool functionality by allowing users to apply callbacks to the results.
License MIT
Informations about the package laravel-http-pool-callback
Laravel HTTP Pool - Callback
Laravel HTTP Pool - Callback is a package that enhances the HTTP pool functionality in Laravel. It allows users to apply callbacks to the results of HTTP requests made using Laravel's HTTP pool. This makes it easier to process and manipulate the responses as needed.
Installation
You can install the package via Composer:
Usage
Prepare the requests
You must implement the HttpPoolAware
interface and use the HasHttpPool
trait in your repository classes.
This will allow you to register callbacks to be applied to the responses of the requests.
Pool the requests and apply the callbacks
runAsync
will clone your repositories instances to no infer with other requests and delegate the requests to the native Http::pool()
method.
By doing so, you can still benefit from the Http
methods and testing helpers.
When you call getResponses
, it will returns the default Laravel Response
objects.
When you call getResolved
, it will apply the callbacks
to the responses and returns the results.
Testing
Security
If you discover any security related issues, please email the author instead of using the issue tracker.
Credits
- Clément Baconnier
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-http-pool-callback with dependencies
illuminate/http Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0