PHP API client
A simple API client, written with PHP that's easy to use.
The preferred way to install this extension is through composer.
$ composer require codenix-sv/api-client
to the require section of your application's
Make sure you have installed a PSR-18 HTTP Client and PSR-7 message implementation before you install this package. For example:
$ composer require php-http/curl-client nyholm/psr7
Send GET request
use Codenixsv\ApiClient\BaseClient; $client = new BaseClient(); $response = $client->get('https://httpbin.org/get');
Send POST request
use Codenixsv\ApiClient\BaseClient; $client = new BaseClient(); $response = $client->post('https://httpbin.org/post', 'foo=bar');
codenix-sv/api-client is released under the MIT License. See the bundled LICENSE for details.