Download the PHP package codecoz/laravel-rest-client without Composer
On this page you can find all versions of the php package codecoz/laravel-rest-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-rest-client
CodeCoz Laravel REST Client
A powerful, Laravel-native REST API client package built on top of Illuminate\Http\Client. It provides a clean, fluent syntax for consuming external RESTful APIs with enterprise-grade features:
- Authentication handling (Bearer token, API key)
- Comprehensive request/response logging
- Intelligent response caching
- Robust exception handling with specific exception classes
- Easy creation of specific API wrappers
- Fully configurable and extensible
Website: https://codecoz.com
GitHub Repository: https://github.com/codecoz/laravel/rest-client
Features
- Built exclusively on Laravel's native
Illuminate\Http\Client(no direct Guzzle dependency) - Global and per-request authentication (Bearer token, API key, custom headers)
- Automatic request/response logging via Laravel HTTP Client events
- Smart caching with global and per-call control
- Advanced exception handling (4xx, 5xx, connection errors)
- Fluent, chainable API with Laravel-style syntax
- Support for building tailored API wrappers
- Fully configurable via published config file
- PSR-4 compliant, follows SOLID and KISS principles
- Compatible with Laravel 10, 11 and 12
Installation
Require the package via Composer:
Publish Configuration
Configuration
After publishing, edit config/rest-client.php or use environment variables:
Key Configuration Options
Usage
Basic HTTP Requests
Authentication
Global (via config):
Per-request override:
Logging
Logging is enabled by default and uses Laravel's log channels. Logs include URL, method, headers, and body. Disable for sensitive requests:
Caching
Enable globally in config or per request:
Exception Handling
The package throws meaningful exceptions:
Building Specific API Wrappers
Create clean, reusable clients for any external API:
Usage:
Testing
The package includes unit tests using Orchestra Testbench. Run tests with:
Changelog
Please see CHANGELOG.md for recent changes.
Contributing
Contributions are welcome! Please follow the standard GitHub flow:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
CodeCoz Team All contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-rest-client with dependencies
illuminate/http Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/cache Version ^11.0|^12.0
illuminate/log Version ^11.0|^12.0