saxulum/saxulum-http-client-adapter-joomla
最新稳定版本:1.0.5
Composer 安装命令:
composer require saxulum/saxulum-http-client-adapter-joomla
包简介
Saxulum Http Client Adapter Joomla
README 文档
README
Features
- Provides a http client interface adapter for joomla
Requirements
- PHP 5.3+
- Joomla Http ~1.1
Installation
Through Composer as saxulum/saxulum-http-client-adapter-joomla.
Usage
use Saxulum\HttpClient\Joomla\HttpClient;
use Saxulum\HttpClient\Request;
$httpClient = new HttpClient();
$response = $httpClient->request(new Request(
'1.1',
Request::METHOD_GET,
'http://en.wikipedia.org',
array(
'Connection' => 'close',
)
));
You can inject your own joomla http instance while creating the http client instance.
use Joomla\Http\Http;
use Joomla\Http\Transport\Stream as StreamTransport;
use Saxulum\HttpClient\Joomla\HttpClient;
$options = array();
$transport = new StreamTransport($options);
$http = new Http($options, $transport);
$httpClient = new HttpClient($http);
IMPORTANT: The response protocol version is a fake, based on the request ones. Cause this http client does not support to set em.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-24