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

Expose a property in System.Net.Http.HttpResponseMessage which will give the remote ip it connects to #38407

Closed
shine17 opened this issue Jun 25, 2020 · 5 comments

Comments

@shine17
Copy link

shine17 commented Jun 25, 2020

Currently the HttpResponseMessage doesn't expose a property which tells which remote ip it gets response from. There is no way of getting the ip address when TCP connection established. It will be good if we can expose a property in HttpResponseMessage which tells about the ip it get response. Node js https library have that, I think dotnet also should have this exposed.

 var http = require('https');
  http.get('https://www.google.com', function(res) {
    console.log('remote IP: ' + res.connection.remoteAddress);
    ...
  });
@Tratcher Tratcher transferred this issue from dotnet/aspnetcore Jun 25, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Net untriaged New issue has not been triaged by the area owner labels Jun 25, 2020
@ghost
Copy link

ghost commented Jun 25, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@ghost
Copy link

ghost commented Jul 2, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@scalablecory scalablecory removed the untriaged New issue has not been triaged by the area owner label Jul 2, 2020
@scalablecory scalablecory added this to the Future milestone Jul 2, 2020
@scalablecory
Copy link
Contributor

@shine17 do you have a proposed API? there are a few different ways we might do this -- we're generally inclined to not introduce a new API for this as it would introduce overhead for all users, not just those who would use it. But, there may be other ways (such as using System.Net.Connections to filter on connect()).

@karelz
Copy link
Member

karelz commented Jan 6, 2022

Duplicate of #63159

@karelz karelz marked this as a duplicate of #63159 Jan 6, 2022
@karelz karelz closed this as completed Jan 6, 2022
@karelz
Copy link
Member

karelz commented Jan 6, 2022

(it has more details, so closing this issue)

@karelz karelz modified the milestones: Future, 7.0.0 Jan 11, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants