eggbe/client-bridge 问题修复 & 功能扩展

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

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

eggbe/client-bridge

Composer 安装命令:

composer require eggbe/client-bridge

包简介

Client part of the client-server communications library.

README 文档

README

This is the client part of the lightweight and high-performance library that implements client-to-server and server-to-server communications.

Requirements

Install

Here's a pretty simple way to start using Eggbe/ClientBridge:

Step 1: Use Composer to add Eggbe/ClientBridge in your project:

composer require eggbe/client-bridge

Step 2: Create and configure an instance anywhere in your code:

$Bridge = new \Eggbe\ClientBridge\Bridge([
	'url' => 'server-url',
	'method' => \Eggbe\ClientBridge\Bridge::RM_POST,
]);

The method option be be one of two possible values: Get or Post. By default it set in Get. Other request methods currently are not allowed here.

Usage

You have to use the following method to create request with custom parameters and send it:

$Bridge->with('custom-parameter-name', 'custom-parameter-value')->send();

Also you could use a more smart syntax if you like it. The following code is identical to the previous:

$Bridge->withCustomParameterName('custom-parameter-value')->send();

Unfortunately in now this library is only support the HTTP/HTTPS protocols but we have plans to extend this part of the functionality. We will keep you in touch!

License

This package is released under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-24