keerill/laravel-http-client-logger

This is my package laravel-http-client-logger

v1.1.2 2024-04-23 09:13 UTC

This package is auto-updated.

Last update: 2024-11-08 17:23:19 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require keerill/laravel-http-client-logger

Usage

use Psr\Log\LoggerInterface;

/** @var LoggerInterface $logger */
$logger = logger();

$response = Http::baseUrl('http://microservice/api/v1')
        ->withMiddleware(new HttpLoggerMiddleware($logger, new ContextFormatter()))
        ->post('/healthcheck', ['test' => 'message'])
        ->json();

// ...

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.