Skip to content

Conversation

allflame
Copy link

Added a method to fetch curl_getinfo from the curl resource.

@mekras
Copy link
Collaborator

mekras commented Nov 29, 2017

What the purpose of this method?

@allflame
Copy link
Author

allflame commented Nov 29, 2017

@mekras I'm not even sure how to describe this more direct.
There is no way to inject any logging for connection times, ns lookups etc, which is provided by curl_getinfo. The solution is either to expose the resource itself (which is potentially dangerous) or to expose its state, e.g. through curl_getinfo

@mekras
Copy link
Collaborator

mekras commented Nov 29, 2017

It doesn't make sense, because curl-client is just an implementation of HttpClient interface, which doesn't have this method. So it will be unusable.

@Nyholm
Copy link
Member

Nyholm commented Mar 26, 2018

Im 👎
I just removed this function from Buzz. See kriswallsmith/Buzz#291

I would rather add more data to the exception thrown.

@allflame
Copy link
Author

The case was not only to fetch data during errors, but for successful requests as well.
The other option would be to decorate the response that is generated by the Client, but guess what - all functions are made private and there is "new ResponseBuilder" instatination right there.

@dbu dbu closed this Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants