Closed ruudk closed 7 years ago
License: MIT
Allows you to configure the used class per client. This is esp useful when you use the Auto Wire function in Symfony 3.3.
Simply create a class like this:
<?php declare(strict_types=1); namespaceDemoBundle; use GuzzleHttp\Client; class PaymentsApiClient extends Client { }
And then configure your service like this:
guzzle: clients: payments_api: class: 'DemoBundle\PaymentsApiClient' base_url: '%payments_api_endpoint%'
Then you can use PaymentsApiClient as a dependency of your Guzzle Service
PaymentsApiClient
Nice feature! Thanks for contributing, @ruudk!
@florianpreusner Thanks for merging. Could you please tag a new release? :)
Released in v6.1.0 (https://github.com/8p/GuzzleBundle/releases/tag/v6.1.0)
License: MIT
Allows you to configure the used class per client. This is esp useful when you use the Auto Wire function in Symfony 3.3.
Simply create a class like this:
And then configure your service like this:
Then you can use
PaymentsApiClient
as a dependency of your Guzzle Service