yuca / basic-api-client
v0.1.1
2018-08-09 03:35 UTC
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^5.0
This package is auto-updated.
Last update: 2019-09-04 02:47:57 UTC
README
一个简单的 PHP 客户端,用于基于 HTTP Basic 认证的 API 请求。
安装
composer require yuca/basic-api-client
用法
$client = new Yuca\BasicApiClient([ 'baseUrl' => 'https://example.com/api', 'username' => 'username', 'password' => 'password', 'return' => 'array', // object or array ]); $client->get('articles', ['limit' => 10]); $client->post('article/create', ['title' => 'Awesome!']);
许可证
MIT