E
eddy1234_676
Guest
I am using HttpClient object to POST a request message to the server. The HttpClientHandler defined to use a Proxy. The proxy is ignored with the POST message and never used when posting to the server. No errors or exceptions reported.
Code spinets:
var handler = new HttpClientHandler
{
UseDefaultCredentials = true,
UseProxy = true,
ClientCertificateOptions = ClientCertificateOption.Automatic,
Proxy = myProxy,
AllowAutoRedirect = false
};
var httpContent = new StringContent(requestString, Encoding.ASCII, "application/xml");
var result = await httpClient.PostAsync(url, httpContent);
resultAsString = await result.Content.ReadAsStringAsync();
Do you have idea what could be went wrong?
Regards
Continue reading...
Code spinets:
var handler = new HttpClientHandler
{
UseDefaultCredentials = true,
UseProxy = true,
ClientCertificateOptions = ClientCertificateOption.Automatic,
Proxy = myProxy,
AllowAutoRedirect = false
};
var httpContent = new StringContent(requestString, Encoding.ASCII, "application/xml");
var result = await httpClient.PostAsync(url, httpContent);
resultAsString = await result.Content.ReadAsStringAsync();
Do you have idea what could be went wrong?
Regards
Continue reading...