I have this code
using (var stream = new StreamWriter(request.GetRequestStream(), Encoding))
stream.Write(body.ToString());
I need to make it asynchronous. As far as I understand it, this means I need to change the call to request.GetRequestStream() to the asychronous.BeginGetRequestStream(). I have seen this example but cannot figure out how to apply that to this scenario. Can someone help?
The documentation has a good example (http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.begingetrequeststream(v=vs.100).aspx):