A intermediary library to process http-message psr7 compliant objects by managing their cookies
A intermediary library to process http-message psr7 compliant objects by managing their cookies.
The installation of this library is made via composer.
Download composer.phar
from their website.
Then add to your composer.json :
"require": {
...
"php-extended/php-http-cookiebag-processor": "~1",
...
}
Then run php composer.phar update
to install this library.
The autoloading of all classes of this library is made through composer's autoloader.
This library is to make a man in the middle for http requests and responses and logs the events when requests passes. It may be used the following way :
/* @var $processor PhpExtended\HttpProcessor\ProcessorInterface */
/* @var $request Psr\Http\Message\RequestInterface */ // psr-7
$processor = new CookiebagProcesor($processor);
$response = $processor->process($request);
/* @var $response Psr\Http\Message\ResponseInterface */
This library handles the adding of Cookie
header on the requests and the
decoding according to the Set-Cookie
headers on the responses.
MIT (See license file).