I’m trying to call Google Search RESTful API using javascript
prototype library.

Here is my code:

      new Ajax.Request('http://ajax.googleapis.com/ajax/services/
search/local?sll=28.2117,77.2629&mrt=localonly&q=DLF
%20Building&v=1.0&rsz=large',
         {
            method:'get',
            requestHeaders: {Accept: 'application/json'},
            onSuccess: reportSuccess,
            onFailure: reportError
          });

    function reportError(request)
    {
        alert(request);

    }
     function reportSuccess(transport, json)
    {
        var json = transport.responseText.evalJSON(true);
    }

But it returns nothing.

Is there any way to call RESTful APIs using javascript, I don’t want
to use Google’s javascript controls.

Thanks,
Sumit Arora

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