campru/guzzle-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

campru/guzzle-bundle

最新稳定版本:v1.0.1

Composer 安装命令:

composer require campru/guzzle-bundle

包简介

Provide Silex web profiler for Guzzle

README 文档

README

Provide an advanced profiler for Guzzle. This profiler is for debug purposes and will display a dedicated report available in the toolbar and Silex Web Profiler

Guzzle Symfony web profiler panel

Guzzle Symfony web profiler panel - request details

Guzzle Symfony web profiler panel - response details

Installation

Add the composer requirements

{
    "require": {
        "campru/guzzle-bundle": "1.0.0"
    },
}

Enable it in your application

use Campru\GuzzleBundle\Provider\GuzzleProfilerServiceProvider;

$app->register(new GuzzleProfilerServiceProvider());

The provider depends on WebProfilerServiceProvider, so you also need to enable this if that's not already the case

use Silex\Provider\WebProfilerServiceProvider;

$app->register(new Provider\WebProfilerServiceProvider())

Finally, it's needed to add two subscribers to Guzzle client when this is created

use GuzzleHttp\Client;

$client = new Client(['base_url' => 'http://my.api.com']);

$client->getEmitter()->attach($app['guzzle_bundle.subscriber.profiler']);
$client->getEmitter()->attach($app['guzzle_bundle.subscriber.storage']);

Licence

This bundle is under the MIT license. See the complete license in the bundle

统计信息

  • 总下载量: 1.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-02