enathan/laravel-http-rest-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

enathan/laravel-http-rest-client

Composer 安装命令:

composer require enathan/laravel-http-rest-client

包简介

Simple REST client for Laravel

README 文档

README

Simple HTTP rest client for Laravel by eNathan

Installation via Composer

Add the following to your composer.json's dependency list:

    "require": {
        "enathan/laravel-http-rest-client"
    }

Update Composer

In the root directory of your Laravel project (where composer.json is located), run:

composer update

Add Service Provider

Open config/app.php and add the following line to the providers array:

$providers => [
... ,
'App\Providers\LaravelHttpRestClient'
];

Usage

The RestClient is a singleton registered in Laravel's IoC as HttpRestClient. You can access the rest client by using \App::make('HttpRestClient').

Example

$RestClient = \App::make('HttpRestClient');
$response = $RestClient->get('http://my_rest_server.com/',
    array(
        'username': 'foo',
        'password': 'bar
    )
);

统计信息

  • 总下载量: 2.6k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-16