Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET 4.5 HttpClient request ServicePoint

Tags:

c#

.net-4.5

I have always used so far:

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(targetUri);

do the request
.................
request.ServicePoint. 

Now I would like to use the new HttpClient from .net 4.5 and I don't know how to access the ServicePoint properties.

Any ideas how can I access the ServicePoint by using HttpClient?

like image 856
user2818430 Avatar asked Oct 20 '22 23:10

user2818430


1 Answers

I believe you will have to use the ServicePointManager to do what you want. Something like;

ServicePointManager.FindServicePoint(targetUri)
like image 131
Halvard Avatar answered Oct 24 '22 11:10

Halvard