All Projects → alimranahmed → Easyhttp

alimranahmed / Easyhttp

Licence: apache-2.0
A Laravel HTTP-client to make HTTP request easier and log requests and responses

Projects that are alternatives of or similar to Easyhttp

Laravel Database Encryption
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Stars: ✭ 238 (+1090%)
Mutual labels:  laravel, laravel5, composer
Laravel Ecommerce
Laravel open source e-commerce system.
Stars: ✭ 163 (+715%)
Mutual labels:  laravel, laravel5, composer
Larrock Core
Core components for LarrockCMS
Stars: ✭ 46 (+130%)
Mutual labels:  laravel, laravel5, composer
Coastercms
The repository for Coaster CMS (coastercms.org), a full featured, Laravel based Content Management System
Stars: ✭ 380 (+1800%)
Mutual labels:  laravel, laravel5, composer
Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (+2775%)
Mutual labels:  laravel, composer
Ip Location Zh
获取 IP 地址的真实地理位置
Stars: ✭ 556 (+2680%)
Mutual labels:  laravel, composer
Lang
List of 78 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.
Stars: ✭ 6,285 (+31325%)
Mutual labels:  laravel, laravel5
Twitter
Twitter API for Laravel 5.5+, 6.x, 7.x & 8.x
Stars: ✭ 755 (+3675%)
Mutual labels:  laravel, laravel5
Laravel Kit
A desktop Laravel admin panel app
Stars: ✭ 440 (+2100%)
Mutual labels:  laravel, composer
Sleepingowladmin
🦉 Administrative interface builder for Laravel (Laravel admin)
Stars: ✭ 671 (+3255%)
Mutual labels:  laravel, composer
Laravel Widgetize
A minimal package to help you make your laravel application cleaner and faster.
Stars: ✭ 791 (+3855%)
Mutual labels:  laravel, laravel5
Laravel React
Laravel 8 and React 17 boilerplate
Stars: ✭ 472 (+2260%)
Mutual labels:  laravel, composer
Fullycms
Fully CMS - Multi Language Content Management System - Laravel
Stars: ✭ 465 (+2225%)
Mutual labels:  laravel, laravel5
Laracms
LaraCMS 是在学习 laravel ( web 开发实战进阶 + 实战构架 API 服务器) 过程中产生的一个业余作品,试图通过简单的方式,快速构建一套基本的企业站同时保留很灵活的扩展能力和优雅的代码方式,当然这些都得益Laravel的优秀设计。同时LaraCMS 也是一个学习Laravel 不错的参考示例。
Stars: ✭ 588 (+2840%)
Mutual labels:  laravel, laravel5
Framework
The truly Laravel E-commerce Framework
Stars: ✭ 456 (+2180%)
Mutual labels:  laravel, laravel5
Laravel User Verification
PHP package built for Laravel 5.* to easily handle a user email verification and validate the email
Stars: ✭ 755 (+3675%)
Mutual labels:  laravel, laravel5
Aliyun Sts
基于阿里云openapi系列接口中STS最新版本的SDK进行封装的composer package,解耦其他产品SDK,各个产品SDK功能使用组件化加载,减少代码臃肿。
Stars: ✭ 19 (-5%)
Mutual labels:  laravel, composer
Angular5.2 Laravel5.6
Angular 5.2 and Laravel 5.6 Authentication and CRUD
Stars: ✭ 17 (-15%)
Mutual labels:  laravel, laravel5
Barryvanveen
📰 Personal blog of Barry van Veen. Focuses on Laravel Framework, website optimization and natural computing.
Stars: ✭ 24 (+20%)
Mutual labels:  laravel, laravel5
Laravel Restaurant Pos
Restaurant POS
Stars: ✭ 27 (+35%)
Mutual labels:  laravel, laravel5

EasyHttp

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.

Installation

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

composer require alimranahmed/easyhttp

That's all!

Usages

By default all the request is made using Guzzle.

<?php
//For GET request
$response = Http::get('www.example.com/get');
 
//For POST Request
$data = ['key' => 'value'];
$headers = ['Content-Type' => 'application/json'];
$response = Http::post('www.example.com/post', $data, $headers);
 
//For PUT request
$data = ['key' => 'value'];
$headers = ['Content-Type' => 'application/json'];
$response = Http::put('www.example.com/put', $data, $headers);
 
//For DELETE request
$response = Http::delete('www.example.com/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:

<?php
Http::using('curl')->get('www.example.com/get');

License

This package is licensed under Apache License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].