phpid / lib-api
There is no license information available for the latest version (1.0.0) of this package.
Simple API Client
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
1.0.0
2020-01-02 06:27 UTC
Requires
- pds/skeleton: ^1.0
This package is auto-updated.
Last update: 2026-04-29 02:18:42 UTC
README
Simple HTTP and REST API Client
Usage
use Phpid\Adapters\RestApiClient;
$rest = new RestApiClient('https://postman-echo.com');
$payload = [
'title' => 'Test Payload REST Client',
'description' => 'none'
];
// GET Request
echo $rest->get('/get')->response('body') . PHP_EOL;
// POST Request
echo $rest->post('/post', $payload)->response('body') . PHP_EOL;
// PUT Request
echo $rest->put('/put', $payload)->response('body') . PHP_EOL;
// DELETE Request
echo $rest->delete('/delete')->response('body') . PHP_EOL;
Install
Install through composer
# composer require phpid/lib-api