Download the PHP package smokills/laravel-http-client-default-options without Composer
On this page you can find all versions of the php package smokills/laravel-http-client-default-options. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smokills/laravel-http-client-default-options
More information about smokills/laravel-http-client-default-options
Files in smokills/laravel-http-client-default-options
Package laravel-http-client-default-options
Short Description Extends the native Laravel Http Client, so that you can define global options
License MIT
Homepage https://github.com/smokills/laravel-http-client-default-options
Informations about the package laravel-http-client-default-options
Set default available options to the Laravel Http Client.
Installation
Install the package via composer:
Laravel
In a Laravel environment, the package will be autoregistered thanks to the Laravel Package Auto-Discovery
Lumen
If You would like use this package within a Lumen installation, you have to register the Service Provider in the app/bootstrap.php
Usage
You may define global options for the Http client in following way
From now on, all subsequent request will use the default options we have provided:
We can still continue add other options or helpers if we need:
If you need to remove several or even all of the the default options, in order to make other requests, you may use the withoutDefaultOptions
method.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Vito Famiglietti
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
All versions of laravel-http-client-default-options with dependencies
illuminate/http Version ^8.0
guzzlehttp/guzzle Version ^7.0.1
illuminate/support Version ^8.0