superbrave / verbose-error-http-client
Increased verbosity of error messages in the Symfony HTTP client.
Installs: 3 563
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.2
- symfony/dependency-injection: ^6.3|^7.0
- symfony/framework-bundle: ^6.3|^7.0
- symfony/http-client-contracts: ^3.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.54
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
- roave/security-advisories: dev-latest
- symfony/http-client: ^6.3|^7.0
Suggests
- symfony/http-client: This package requires an actual Symfony HTTP client implementation to decorate.
Provides
This package is auto-updated.
Last update: 2024-11-26 13:36:45 UTC
README
Increased verbosity of error messages in the Symfony HTTP client.
Installation using Composer
Run the following command to add the package to the composer.json of your project:
$ composer require superbrave/verbose-error-http-client-bundle symfony/http-client
The symfony/http-client
can be replaced with any other HTTP client implementing the Symfony HTTP client contracts.
Usage
The following example shows how to create the instances required execute requests with verbose exception messages:
<?php use Superbrave\VerboseErrorHttpClient\HttpClient\VerboseErrorHttpClient;use Symfony\Component\HttpClient\HttpClient; $httpClient = HttpClient::create(); $verboseErrorHttpClient = new VerboseErrorHttpClient($httpClient); $response = $verboseErrorHttpClient->request('GET', 'https://superbrave.nl/api');
License
The Verbose error HTTP client is licensed under the MIT License. Please see the LICENSE file for details.