Reputation: 359
In .NET (for Windows Phone), I'm trying to use the WebClient class to send XML to a web service. The examples I found modify add headers with an Add method, but I am getting an error that the Add method could not be found:
using System.Net;
...
WebClient wc = new WebClient();
wc.Headers.Add(HttpRequestHeader.ContentType, "text/xml");
Am I just missing a reference somewhere or has this been changed? I also don't have a Set method listed either.
Upvotes: 4
Views: 1665