bmancone/guzzle-stopwatch-middleware 问题修复 & 功能扩展

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

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

bmancone/guzzle-stopwatch-middleware

最新稳定版本:v1.0.2

Composer 安装命令:

composer require bmancone/guzzle-stopwatch-middleware

包简介

Stopwatch Middleware for Guzzle.

README 文档

README

Author Latest Version Build Status

Installation

composer require bmancone/guzzle-stopwatch-middleware

Usage

Requires an instance of Symfony\Component\Stopwatch\Stopwatch.

use GuzzleHttp\Client; use GuzzleHttp\HandlerStack; use GuzzleHttp\Psr7\Request; use Symfony\Component\Stopwatch\Stopwatch; Use Leadz\GuzzleHttp\Stopwatch\StopwatchMiddleware; // Create the default HandlerStack $stack = HandlerStack::create(); // Create the middleware $middleware = new StopwatchMiddleware(new Stopwatch()); // Push the Middleware to the stack $stack->push($middleware); // Create the client $client = new Client([ 'handler' => $stack ]); // Send the request $request = new Request('GET', 'https://en.wikipedia.org/wiki/Main_Page'); $response = $client->send($request); // Get the duration of the request printf('Request to [%s] took [%dms]', (string)$request->getUri(), $response->getHeaderLine('X-Duration'));

Symfony Profiler

If you are using Symfony, simply inject debug.stopwatch (or use autowiring), this will add events to the profiler timeline.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固