glow / guzzler
该软件包已被放弃,不再维护。未建议替代软件包。
HTTP 库的简化包装器
1.9
2018-06-14 13:07 UTC
Requires
- guzzlehttp/psr7: ^1.4
- monolog/monolog: ^1.23
- php-http/client-common: ^1.7
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.4
- php-http/logger-plugin: ^1.0
- php-http/message: ^1.6
- webmozart/assert: ^1.3
Requires (Dev)
- php-http/buzz-adapter: ^1.0
- php-http/curl-client: ^1.7
- php-http/guzzle6-adapter: ^1.1
This package is not auto-updated.
Last update: 2018-06-14 13:08:14 UTC
README
为 Guzzle 5.3 提供简单的 GET 包装器
安装
安装 Glow\Guzzler 的推荐方法是使用 Composer。
composer require glow/guzzler
示例
<?php
$example_guzzler = new Glow\Guzzler\Guzzler;
$example_guzzler->setUserAgent('Some UA');
$example_guzzler->setRequestUrl('http://www.example.com');
//grab the contents
$example_guzzler->getResponseContents();
//grab the status code
$example_guzzler->getStatusCode();
附加信息
要使用此功能,您首先需要一个来自: http://docs.php-http.org/en/latest/clients.html 的客户端。