OutSystems + Ajax (Story of missing headers)

OutSystems + Ajax (Story of missing headers)

  
Hi All,

I have an Ajax call on a JSF page, which is a POST request to another app, outside of outsystems. With the Ajax request, we are expecting some custom headers to come from the other app. And those headers, would be used to process the incoming response. (Think encryption/decryption).

While, this setup works on a stand-alone app (local HTML files), when I execute this AJAX request on an OutSystems page, the headers go missing.

I am not sure where to hunt them down. I am almost sure that the other app is actually sending the required headers. But, on the Ajax response, those headers are missing. I can only see the "Content-Type" header.

Would it help to look at the network requests between my system and the OutSystems server? Or is their any way I could look at the incoming and outgoing requests on my app on the OutSystems server? If so, how to I get access to the OutSystems server logs?
Hello,

Can you explain a little better how you're making the AJAX requests to the other server and what you are using to get the headers back from the response?

It seems that what you really need on this is to use the ardoHTTP extension, where you can make any request you want and get back the information from the headers in the response :)

Best regards,
Ricardo Silva
Hi Ricardo,

I am using Sencha touch (Ext JS) for making the ajax call. The other application supplies the headers normally when it responds back to the call.

I will try ardoHTTP and see how it helps. Thanks for your reply.
I gave ardoHTTP a try, but we need it to be much more customisable, in terms of configuring multiple endpoints, and retry logic in case of failures.

That would probably involve quite a bit of workarounds. 

Coming back to the original question about missing headers. They show up in the browser's console. But, they are missing in the actual AJAX call's response handlers. 

I am sure that the web service is responding with the required headers and I can see it on chrome if I run the html page outside OutSystems server.    The web service is not hosted on OutSystems server. We are trying to consume this web service within the OutSystems app.  Not sure whats causing this when deployed on O/S server.