versionable/prospect
Composer 安装命令:
composer require versionable/prospect
包简介
Library for making HTTP requests
关键字:
README 文档
README
README
What is Prospect?
Prospect is a fully featured PHP 5.3 HTTP compliant client library.
It has object orientated API making it easy to construct both simple and more complicated requests.
The library supports such features as cookies, headers and files.
Features supported out of the box:
- Highly tested code base
- Object orientated API
- Ability to send HTTP headers
- Cookies
- Files
Requirements
- PHP 5.3.x
- Curl (optional)
Usage
Performing a simple get request
include 'src/Versionable/Prospect/Request/Request.php'; include 'src/Versionable/Prospect/Url/Url.php'; include 'src/Versionable/Prospect/Adapter/Curl.php'; include 'src/Versionable/Prospect/Client/Client.php'; include 'src/Versionable/Prospect/Response/Response.php'; use \Versionable\Prospect\Request\Request; use \Versionable\Prospect\Url\Url; use \Versionable\Prospect\Adapter\Curl; use \Versionable\Prospect\Client\Client; use \Versionable\Prospect\Response\Response; $request = new Request(new Url('http://versionable.co.uk/')); $client = new Client(new Curl()); $response = $client->send($request, new Response());
统计信息
- 总下载量: 1.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-06-02