Metro Style App HttpWebRequest Headers doesn't contain a definition for Add

404 Views Asked by At

I want to add custom header/value pair into HttpWebRequest object's headers collection. I can add custom header/value pair into the collection in WPF application like this.

HttpWebRequest HWR = (HttpWebRequest)WebRequest.Create("........");
WHR.Headers.Add("Header", "Value");

But!

When I use the same code in a Metro Style App, an error as title rises. How am I supposed to add custom header/value pair into headers collection?

Thank you...

0

There are 0 best solutions below