How do I add an HTTP header to a web service call?
I am calling a web service from a console application - everything in C # to .NET.
I want to add an HTTP header (not a SOAP header) to a web service call. How to do it?
This is what my code looks like:
EatService es = new EatService(); // web service added in Web References
// Add HTTP header X-Info = "extra info" here
string info = es.GetMoreInfo(); // ws call
+2
source to share
1 answer
If you are using ASMX Web Service Proxy (Web Reference) then this is a duplicate of Adding custom Http headers to C # Web Service Proxy .
+4
source to share