-
Notifications
You must be signed in to change notification settings - Fork 983
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
Feature Request: Add an additional method on Response that allows you to see the resolved IP of the Response #1186
Comments
@BobbyMcWho sounds useful and I don't think this is currently available in Faraday. Just a list of "requirements":
|
@iMacTia how do you feel about |
@BobbyMcWho that would work, I was thinking also of |
Yeah I started digging into this last night and there doesn't seem to be broad support for it in the http libraries, even Net::Http is a bit more of a challenge than I expected. I'll have to do some more digging when I have some time |
I know this request is a bit stale, but knowing the host ip address would be super useful for us, to trace connections. |
I unfortunately don't have time to work on this, so if you want to pick up the mantle, I'm sure others will want it later as well 😅 |
I've done some fairly comprehensive digging into the source code of this gem, typhoeus, and net::http, and I believe this should be something we can implement.
I would like to be able to access the resolved IP of the request on the response body, Net::HTTP I believe exposes this via #ipaddr, and Typhoeus via Response::Informations#primary_ip.
I believe this would involve adding the method to the
Faraday::Response
class similar to body, adding an ip attr to the Env class, and in each adapter changing the save_response call to also add the ip info to the env.The text was updated successfully, but these errors were encountered: