2017 © Pedro PelĂĄez
 

library transport

A simple chainable transport client.

image

bee4/transport

A simple chainable transport client.

  • Wednesday, August 31, 2016
  • by shulard
  • Repository
  • 3 Watchers
  • 17 Stars
  • 2,111 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 6 Open issues
  • 22 Versions
  • 0 % Grown

The README.md

bee4/transport

Build Status Scrutinizer Code Quality Code Coverage SensiolabInsight, (*1)

License, (*2)

This library is a transport client that can be used to handle HTTP, FTP, FTPS, SFTP, SCP calls. All protocols are processed the same way and the API is a simple Request > Response mechanism., (*3)

It is inspired by the Guzzle 3 implementation with a simpler approach (no curl_multi, no SSL...), just Request and Response handling. For the moment cURL is the only implementation and all Requests options are CURL_* options..., (*4)

Installing

Latest Stable Version Total Downloads, (*5)

This project can be installed using Composer. Add the following to your composer.json:, (*6)

{
    "require": {
        "bee4/transport": "~1.2"
    }
}

or run this command:, (*7)

composer require bee4/transport:~1.2

Example

You must create a Client instance then built the request and send it to retrieve the response., (*8)

<?php
$client = new Bee4\Transport\MagicHandler();
$request = $client->get('http://www.example.com', ['Accept: text/html']);
$response = $request->send();

$respose->getStatusMessage(); //Retrieve the status definition example: 301 Moved Permanently
$respose->getBody(); //Retrieve response content

//The same is possible with FTP
$request = $client->head('ftp://user@pass:host.com/path')->send();
//Remove a file
$client->delete('ftp://user@pass:host.com/path/to/file.php')->send();

//And SFTP - Upload a file
$client->put('sftp://user@pass:host.com/path/to/file.php')
  ->setBody('File content here')
  ->send();

A mapping is done between HTTP methods name and client calls to maintain the same API :, (*9)

  • head is used to check if the resource is here ;
  • get is used to retrieve a resource ;
  • put is used to upload a resource ;
  • delete is used to remove a resource.

Others method are handled only by HTTP: POST, (*10)

The Versions

31/08 2016

dev-master

9999999-dev

A simple chainable transport client.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

31/08 2016

v2.0.0

2.0.0.0

A simple chainable transport client.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

07/07 2016

v1.x-dev

1.9999999.9999999.9999999-dev

A simple chainable HTTP client.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

04/07 2016

dev-feature/build-with-docker

dev-feature/build-with-docker

A simple chainable HTTP client.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

04/07 2016

dev-feature/hhvm

dev-feature/hhvm

A simple chainable HTTP client.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

09/12 2015

v1.2.0

1.2.0.0

A simple chainable HTTP client.

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

23/09 2015

v1.1.4

1.1.4.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

by Stéphane HULARD

21/09 2015

v1.1.3

1.1.3.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

by Stéphane HULARD

22/07 2015

v1.1.2

1.1.2.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

by Stéphane HULARD

15/06 2015

v1.1.1

1.1.1.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

28/05 2015

v1.1.0

1.1.0.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

06/03 2015

v1.0.5

1.0.5.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

02/03 2015

v1.0.4

1.0.4.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

22/10 2014

v1.0.3

1.0.3.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

06/10 2014

v1.0.2

1.0.2.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

06/10 2014

v1.0.1

1.0.1.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

03/10 2014

v1.0.0

1.0.0.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Stéphane HULARD

04/09 2014

v0.0.5

0.0.5.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

by Stéphane HULARD

19/08 2014

v0.0.4

0.0.4.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

by Stéphane HULARD

10/06 2014

v0.0.3

0.0.3.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

by Stéphane HULARD

28/05 2014

v0.0.2

0.0.2.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

by Stéphane HULARD

07/03 2014

v0.0.1

0.0.1.0

A simple chainable HTTP client. Built for intensive HTTP calls!

  Sources   Download

Apache-2.0

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

by Stéphane HULARD