Download the PHP package imahmood/laravel-http-client without Composer
On this page you can find all versions of the php package imahmood/laravel-http-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imahmood/laravel-http-client
More information about imahmood/laravel-http-client
Files in imahmood/laravel-http-client
Package laravel-http-client
Short Description Laravel HTTP Client Wrapper
License MIT
Informations about the package laravel-http-client
Laravel HTTP Client Wrapper
This is a simple wrapper around Laravel's HTTP Client that simplifies making HTTP requests and handling responses. It provides an easy-to-use interface for common HTTP operations.
Installation
You can install this package via Composer:
Usage
Sending a GET Request
To send a GET request, use the following code:
Sending a POST Request
To send a POST request, you can do it like this:
Uploading Files
To upload files, attach them to the request using the addFile
method:
Sending a Request with a Bearer Token
If you need to send a request with a Bearer Token for authentication, you can do so like this:
Request duration
You can easily retrieve the duration of a http request:
Handling Unsuccessful Responses
You can easily throw an exception if the response is unsuccessful:
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-http-client with dependencies
guzzlehttp/guzzle Version ^7.8
illuminate/http Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/validation Version ^9.0|^10.0|^11.0