juwai/laravel-http-rpc
最新稳定版本:1.0.0
Composer 安装命令:
composer require juwai/laravel-http-rpc
包简介
Laravel package for http rpc client
README 文档
README
This package provides an easy way of connecting to HTTP RPC.
Installation
-
Add facade and providers to
config/app.php'aliases' => [ ... 'HTTPRPC' => Juwai\LaravelHTTPRPC\Facades\HTTPRPC::class, ],
'providers' => [ ... Juwai\LaravelHTTPRPC\Providers\HTTPRPCClientProvider::class, ],
-
Publish config file:
$ php artisan vendor:publish
-
Add real service configuration to the published config file
config/httprpc.php.
Usage
GET method
$client = HTTPRPC::get('service_one', '1.0'); $response = $client->service_function($param1, $param2);
POST method
$client = HTTPRPC::get('service_one', '1.0', 2000, 'POST'); $response = $client->service_function(['param1' => $param1, 'param2' => $param2]);
Connection monitor
If you installed Debugbar the RPC connection information shows on Debugbar panels.
统计信息
- 总下载量: 3.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-08