This is a simple, very basic implementation of the PSR-7 standard. This library does not come with a client and only deals with the messages.
composer require dspacelabs/http-messageuseDspacelabs\Component\Http\Message\Uri;
$uri = (newUri())
->withScheme('http')
->withHost('www.example.com');If you want something less verbose, you can also pass in the URL when creating new Uri objects.
useDspacelabs\Component\Http\Message\Uri;
$uri = newUri('http://www.example.com');useDspacelabs\Component\Http\Message\Uri;
useDspacelabs\Component\Http\Message\Request;
$request = newRequest();
$request
->withMethod('GET')
->withUri(newUri('http://www.example.com'));useDspacelabs\Component\Http\Message\Response;
$resposne = newResponse();
$response
->withStatus(200, 'OK');Testing is done with PHPUnit and Phing. Once you make updates, run the command
./vendor/bin/phingAnd this will run PHPUnit and give you test results.