Closed allflame closed 5 years ago
What the purpose of this method?
@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
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.
Im 👎 I just removed this function from Buzz. See https://github.com/kriswallsmith/Buzz/pull/291
I would rather add more data to the exception thrown.
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.
Added a method to fetch curl_getinfo from the curl resource.