المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Adding custom HTTP header to every webservice calls



C# Programming
05-20-2009, 02:01 PM
Hi all,

Recently i got stuck up with a problem. Am developing a small console application which uses the web services offered by another server!

Now i want to add a custom http header( not SOAP header) to each and every web service call made from the client!

it may look like

POST / HTTP/1.1..
User-Agent: Mozilla/4.0 (compatib le; MSIEMS Web Services Client Protocol 2.0.50727.3082)Content-Type: tex t/xml; charset=u tf-8
SOAPAction : ""
Authorization: Basic UjhDT Ek6
MY header
Host: 192.1 68.70.99:1984
Content-Length: 453

now how do i add, custom http headers to every calls.....

Have a Happy Coding.....