fgsl/http
最新稳定版本:1.4.3
Composer 安装命令:
composer require fgsl/http
包简介
Fgsl Http Requester
README 文档
README
composer require fgsl/http
Run command:
composer install
For getting Composer: https://getcomposer.org/download/
Run unit tests
phpunit --bootstrap tests/bootstrap.php tests/Fgsl/Test/TestSuite.php
How to use
See below a sample of method request.
use Fgsl\Http\Http; $ctx = Http::getContext('GET', null); @$response = Http::request("http://www.horalegalbrasil.mct.on.br/SincronismoPublico.html", $ctx); $this->assertStringContainsString('Sincronismo', $response);
The variable $ctx receives a HTTP context, that is a resource with elements of HTTP protocol.
The variable $response receives HTTP response text, according context defined by $ctx.
Sometimes method request may not work. Then you can use method curl.
See ApiTest class for more examples.
统计信息
- 总下载量: 228
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-only
- 更新时间: 2018-05-03