I'm writing this:
string link = "http://ajax.googleapis.com/ajax/services/
search/web?q=Paris%20Hilton";
Uri URL = new Uri(link);
HttpWebRequest myRequest = (HttpWebRequest)
WebRequest.Create(URL);
myRequest.Method = "GET";
myRequest.Referer = "http://google.ru";
WebResponse myResponse = myRequest.GetResponse();
StreamReader sr = new StreamReader
(myResponse.GetResponseStream());
string temp="";
string res="";
while ((temp = sr.ReadLine()) != null)
{
res = temp + res;
}
As result in variable res I can see: {\"responseData\": null,
\"responseDetails\": \"invalid version\", \"responseStatus\": 400}
What am I doing wrong?
Int the res I want to see the string to make a JSON object.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---