定制 juwai/laravel-http-rpc 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

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

  1. Add facade and providers to config/app.php

    'aliases' => [
        ...
        'HTTPRPC' => Juwai\LaravelHTTPRPC\Facades\HTTPRPC::class,
    ],
    'providers' => [
        ...
        Juwai\LaravelHTTPRPC\Providers\HTTPRPCClientProvider::class,
    ],
  2. Publish config file:

    $ php artisan vendor:publish
  3. 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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-08