mops1k / lazy-http-client-bundle
This package is abandoned and no longer maintained.
The author suggests using the mops1k/api-client-bundle package instead.
Bundle for making async `lazy` http requests
Package info
github.com/mops1k/lazy-http-client-bundle
Type:symfony-bundle
pkg:composer/mops1k/lazy-http-client-bundle
1.5
2019-11-25 10:23 UTC
Requires
- php: ^7.1.3
- ext-json: *
- guzzlehttp/guzzle: ~6.0
- ocramius/proxy-manager: ^2.2
- symfony/framework-bundle: ~4.1|~4.2|~4.3|~4.4|~5.0
- symfony/monolog-bundle: ^3.4
README
This bundle provides lazy http client for symfony 4.1 and above. Lazy means that before you are not using any response methods, request doesn't execute.
Instructions
Usage
Simple usage example
use LazyHttpClientBundle\Client\Manager; use App\ReqresFakeApi\Client; use App\ReqresFakeApi\Query\ListUsersQuery; use App\ReqresFakeApi\Query\SingleUserQuery; $client = $this->get(Manager::class)->get(Client::class); $client->use(ListUsersQuery::class); $listResult = $client->execute(); $client->getRequest()->getParameters()->set('page', 2); $listResult2 = $client->execute(); echo $listResult->getContent(); echo $listResult2->getContent(); echo $listResult2->getStatusCode();