I found the reason why the Shindig Server could not render the Gadget
Spec.

In the Gadget Spec(http://hosting.gmodules.com/ig/gadgets/file/
102505834067229065863/5DWeatherF.xml), it use _IG_FetchXmlContent
method, and which is currently deprecated.

And then I tried to replace _IG_FetchXmlContent with
gadgets.io.makeRequest.
I can fetch the XML Document, but I can't fetch content in it.

Followings are my codes:
     var url="http://www.google.co.uk/ig/api";;
     var params = {};
     var postdata = {"weather" : "taipei"};
     params[gadgets.io.RequestParameters.CONTENT_TYPE] =
gadgets.io.ContentType.DOM;
     params[gadgets.io.RequestParameters.METHOD] =
gadgets.io.MethodType.POST;
     gadgets.io.makeRequest(url, res, params);
     function res(obj) {}

And followings are response:
    throw 1; < don't be evil' >{"http:\/\/www.google.co.uk\/ig\/api":
{"body":"<?xml version=\"1.0\"?><xml_api_reply version=\"1\"><\/
xml_api_reply>","rc":200}}

There's no content in the XML.

But it do has content when it was rendered by browser (http://
www.google.co.uk/ig/api?weather=taipei)

Perhaps the api server got wrong reuqest parameters.

But I check the POST paramters by firefug: (skip some parameters which
are not important)
      url=http%3A%2F%2Fwww.google.co.uk%2Fig%2Fapi
      &httpMethod=POST
      &postData=weather%3Dtaipei
      &contentType=DOM

The postData seems be correct.

Then why can't I fetch the XML content?

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-...@googlegroups.com.
To unsubscribe from this group, send email to 
opensocial-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en.

Reply via email to