pbweb / buzz-bundle
1.2.6
2019-07-12 10:07 UTC
Requires
- php: ^7.1
- kriswallsmith/buzz: ~0.16 <0.17
- symfony/config: ^3.4|^4.0
- symfony/dependency-injection: ^3.4|^4.0
- symfony/http-kernel: ^3.4|^4.0
- symfony/stopwatch: ^3.4|^4.0
- symfony/yaml: ^3.4|^4.0
Requires (Dev)
- mockery/mockery: ^1.2
- pbweb/pbweb-coding-standard: ^1.1.1
- phpunit/phpunit: ^7.5
Replaces
README
此包已被弃用!
请使用优秀的 symfony/http-client。
提供由 Buzz HTTP 客户端库 创建的 Symfony 包,由 Kris Wallsmith 构建。
此包还添加了到 Symfony 调试工具栏的条目,显示请求数量和总请求时间。在配置文件中,您可以查看有关这些请求的更多详细信息,例如头部和响应数据。
安装
使用 Composer 安装
使用 composer 安装 buzz-bundle
composer require pbweb/buzz-bundle
然后,将包添加到您的 AppKernel
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Pbweb\BuzzBundle\PbwebBuzzBundle(),
使用
$browser = $this->container->get('buzz'); $response = $browser->get('http://pbwebmedia.nl');
配置
您可以在您的 app/config.yml
文件中可选地配置 buzz
pbweb_buzz: client_timeout: 60 # Defaults to 5 debug: %kernel.debug% # Enables the data collector in the dev environment
版权
Buzz
版权 ©2010-2011 Kris Wallsmith
Buzz 包
版权 ©2014-2016 PB Web Media