Skip to content

eggbe/client-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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.

About

Client part of the client-server communications library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages