Sorry for the duplicated post, I thought the first one had been lost
in transit.

On Sep 2, 6:37 pm, memeplex <[EMAIL PROTECTED]> wrote:
> Here is a bare minimum example showing what I've described before. It
> consists of a servlet mapped tohttp://telmex.livra.com/requestthat
> serves both a gadget (at /request) and an xmlhttprequest (at /request/
> ajax). This second request is triggered by clicking a button on the
> gadget. The button onclick event handler ultimately calls makerequest.
> The servlet logs the paths of incoming requests to its stdout.
> Following is what I see after each click:
>
> /request/ajax  <-- expected request
> /request  <-- misterious extra request
>
> Could you help me? This is a severe issue with too essential a feature
> (talking to server) and I don't think the problem is at my side
> because of the minimalistic example I'm presenting. At least give me a
> clue to start debugging by my own means, please, I'm stuck with this.
>
> Thank you in advance
> Regards
> -Carlos
>
> ==========================================================================================
> The gadget
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <Module>
>   <ModulePrefs title="Hello World!" description="Testing app"
> author_email="[EMAIL PROTECTED]">
>     <Require feature="opensocial-0.7" />
>   </ModulePrefs>
>   <Content type="html"><![CDATA[
>
> <script>
>
>   function mreq() {
>     var params = {};
>     params[gadgets.io.RequestParameters.CONTENT_TYPE] =
> gadgets.io.ContentType.TEXT;
>     var headers = {};
>         headers["Wicket-Ajax"] = "true";
>         params[gadgets.io.RequestParameters.HEADERS] = headers;
>         params[gadgets.io.RequestParameters.REFRESH_INTERVAL] = 0;
>     gadgets.io.makeRequest("http://telmex.livra.com/request/ajax";,
> response, params);
>   };
>
>   function response(obj) {
>   };
>
> </script>
>
> <input type="button" onclick="mreq()"/>
>
>   ]]></Content>
> </Module>
>
> ==========================================================================================
> The servlet
>
> public class MakeRequestServlet extends HttpServlet {
>
>         @Override
>         protected void doGet(HttpServletRequest req, HttpServletResponse
> resp) throws ServletException, IOException {
>                 System.out.println(req.getRequestURI());
>                 try {
>
> IOUtils.copy(getClass().getResourceAsStream("MakeRequestGadget.xml"),
> resp.getOutputStream());
>                 } catch (IOException e) {
>                         e.printStackTrace();
>                 }
>         }
>
> }
>
> On Sep 2, 3:56 pm, memeplex <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > when executing the following:
>
> >     var params = {};
> >     params[gadgets.io.RequestParameters.CONTENT_TYPE] =
> > gadgets.io.ContentType.TEXT;
> >     params[gadgets.io.RequestParameters.REFRESH_INTERVAL] = 0;
> >     gadgets.io.makeRequest(aUrl, response, params);
>
> > the server is receiving two different requests, one for aUrl and one
> > for the gadget url. Is this expected? If so, is there any way to
> > differentiate between a gadget request that comes immediately after a
> > makeRequest and the initial gadget request?
>
> > Thank you in advance
> > Best regards
> > -Carlos
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to