I am Developing a C#/Xaml Metro Application in that As per the Requirement I want to have a Synchronous service call , instead of ASynchronous Service Call.
This what I have used for Async Operation but I want to make a Synchronus Service Call :
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://xxxxxxx");
request.Method = "POST";
request.Credentials = new NetworkCredential("xxx", "xxx");
using (Stream requestStream = await request.GetRequestStreamAsync())
{
}
How can I make a Synchronous service Call using HttpWebRequest or HttpClient in C#/XAML Metro App ?