Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get connection time in middleware #1152

Closed
pinkeen opened this issue Jun 29, 2015 · 3 comments
Closed

Cannot get connection time in middleware #1152

pinkeen opened this issue Jun 29, 2015 · 3 comments
Milestone

Comments

@pinkeen
Copy link

pinkeen commented Jun 29, 2015

In previous versions it was easy to get the (curl) connection time via $event->getTransferInfo().
In guzzle6 I can't find a good way to do this. It seems that this information is not even stored anywhere.

I am aware that including this additional information would break the elegance and purity of the code so I can live without it. But maybe I am missing sth and it would be possible to pass this information so it's accessible in a handler?

I am using guzzle with a Symfony2 bundle which simplifies API debugging in a few projects. Having the connection time really helps with identifying network problems and slow API endpoints/calls.

@mtdowling
Copy link
Member

This was also requested in #1091 (comment). I would love for there to be a new request option that accepts a callback and invokes the callback with transfer information. Maybe the request option is called "on_transfer_info" and it invokes a callback with a request, response, and array of HTTP handler specific transfer data (non-normalized across backends).

@lvancrayelynghe
Copy link

+1 on this, that would be great !

@funivan
Copy link

funivan commented Jul 20, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants