Remote Request adapter for PSR-7 and PSR-18

v1.1.0 2024-03-31 09:43 UTC

This package is auto-updated.

Last update: 2024-05-31 00:16:23 UTC


Build Status Scrutinizer Code Quality Latest Stable Version Minimum PHP Version Downloads License Code Coverage

PSR adapter for connecting Remote Request into your application with public interfaces.

PHP Installation

composer.phar require alex-kalanis/remote-request-psr

(Refer to Composer Documentation if you are not familiar with composer)

PHP Usage

1.) Use your autoloader (if not already done via Composer autoloader)

2.) Add some external packages with connection to the local or remote services.

3.) Connect the "\kalanis\RemoteRequestPsr\Processor\Simple" into your app.

5.) Just call request


Basic data sending through network. In this case just use php's internal streams.

    $request = \kalanis\RemoteRequestPsr\Content\Request();
    // ... $request is PSR request class WITHOUT immutability. So the most things works.

    $lib = new \kalanis\RemoteRequestPsr\Processor\Simple();
    $response = $lib->process($request);

    // ... $response is PSR response class WITHOUT immutability. So the most things works.
    return strval($response->getBody());