Change the line reading like this:

string link = 
"http://ajax.googleapis.com/ajax/services/search/web?q=Paris%20Hilton 
";

to something like this:

string 
link="http://ajax.googleapis.com/ajax/services/search/web?q=Paris%20Hilton&v=1.0
 
";

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On May 12, 2009, at 2:07 PM, nikotyan wrote:

>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to