tags:

views:

359

answers:

1

I need to get json data from an external domain. I used webrequest to get the response from a website. heres the code:


var request = WebRequest.Create(url);
string text;
var response = (HttpWebResponse) request.GetResponse();

using (var sr = new StreamReader(response.GetResponseStream()))
      {
          text = sr.ReadToEnd();
      }

anyone knows why i cant get the json data?

A: 
Oren A