superbrave/verbose-error-http-client

Increased verbosity of error messages in the Symfony HTTP client.

2.1.2 2024-04-26 12:27 UTC

This package is auto-updated.

Last update: 2024-12-26 13:52:37 UTC


README

Latest version on Packagist Software License

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.