[ACCEPTED]-adding http headers in call to SoapHttpClient service-soaphttpclientprotocol
Accepted answer
It figures that 30 minutes after posting 4 I would stumble across the answer. While 3 the proxy class decelaration does not create 2 a GetWebRequest method, its base class System.Web.Services.Protocols.SoapHttpClientProtocol 1 has it and it can be overridden.
protected override System.Net.WebRequest GetWebRequest(Uri uri)
{
var request = base.GetWebRequest(uri);
request.Headers.Add("blah", "blah"); // <----
return request;
}
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.