innmind/rest-client
最新稳定版本:8.1.0
Composer 安装命令:
composer require innmind/rest-client
包简介
Library to consume REST APIs
README 文档
README
This library is intended to consume APIs built with the RestServer.
Installation
composer require innmind/rest-client
Usage
use Innmind\OperatingSystem\Factory; use Innmind\Url\Path; use Innmind\UrlResolver\UrlResolver; use function Innmind\Rest\Client\bootstrap; $os = Factory::build(); $client = bootstrap( $os->remote()->http(), new UrlResolver, $os->filesystem()->mount(Path::of('/somewhere/to/cache/data')), ); $client ->server('http://example.com/') ->capabilities() ->names();
This example would return all the resource available through the api of http://example.com/.
Then you can access the following method on any server: all, read, create, update and remove. Check the interface to understand how to use these methods.
Structure
统计信息
- 总下载量: 22.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-27