An easier Http client for laravel

1.0.1 2019-05-29 13:35 UTC

This package is not auto-updated.

Last update: 2022-05-14 17:08:08 UTC


Make Http request easily and log the request and response in Laravel's default log(/storage/logs).

This Laravel 5 HTTP-client package to make HTTP request easier. It's a wrap on Guzzle HTTP client and cURL that simplify the common requests. We can use Guzzle or cURL whatever we want on run time of this package.


Run the following command in your terminal while you are at the root of your project directory:

composer require alimranahmed/easyhttp

That's all!


By default all the request is made using Guzzle.

//For GET request
$response = Http::get('');
//For POST Request
$data = ['key' => 'value'];
$headers = ['Content-Type' => 'application/json'];
$response = Http::post('', $data, $headers);
//For PUT request
$data = ['key' => 'value'];
$headers = ['Content-Type' => 'application/json'];
$response = Http::put('', $data, $headers);
//For DELETE request
$response = Http::delete('');
//To Retrieve the response status, header and body
$response->getStatusCode(); //for status code
$response->getHeaders(); //for headers
$response->contents; //for body

To make any request using cURL we can simply use the using() method as below:



This package is licensed under Apache License, Version 2.0