mekras/httplug-diactoros-bridge

This package is abandoned and no longer maintained. The author suggests using the php-http/message package instead.

Httplug Zend Diactoros bridge

This package has no released version yet, and little information is available.


README

Latest Version Software License Build Status Code Coverage Total Downloads

Please see the Httplug official documentation.

Install

Via Composer

$ composer require mekras/httplug-diactoros-bridge

Usage

Using with php-http/curl-client:

use Http\Curl\CurlHttpClient;
use Mekras\HttplugDiactorosBridge\DiactorosMessageFactory;
use Mekras\HttplugDiactorosBridge\DiactorosStreamFactory;

$messageFactory = new DiactorosMessageFactory();
$client = new CurlHttpClient($messageFactory, new DiactorosStreamFactory());

$request = $messageFactory->createRequest('GET', 'http://example.com/');
$response = $client->sendRequest($request);

Using with php-http/socket-client:

use Http\Socket\SocketHttpClient;
use Mekras\HttplugDiactorosBridge\DiactorosMessageFactory;

$messageFactory = new DiactorosMessageFactory();
$client = new SocketHttpClient($messageFactory);

$request = $messageFactory->createRequest('GET', 'http://example.com/');
$response = $client->sendRequest($request);

License

The MIT License (MIT). Please see License File for more information.