jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 270 forks source link

Response is returned, but undefined. #188

Open jeffro25 opened 8 years ago

jeffro25 commented 8 years ago

I have an issue that is driving me crazy. I am able to make cross domain ajax calls, no problem. However, with one in particular ajax request, I can see the response from the server in the network tab in the preview and response tabs, but when I log it to the console, it returns undefined every single time. the data is exactly as I expect it. I have even just returning a string and I get undefined, although I can clearly see it returned in the response tab. Any idea why this would be happening or what could cause it? I have double checked everything and it is almost identical to the request that are working. I can not for the life of me get this request to return the data.

tentonaxe commented 8 years ago

SO question for added context: http://stackoverflow.com/questions/37303900/see-response-in-console-preview-tab-console-log-returns-undefined-ajax-call

jpillora commented 8 years ago

On mobile at the moment though if I had to guess, I'd say something isn't playing nice with XHook. Happening in all browsers? If you can put a demo up, I can try debug when I'm home On Thu, 19 May 2016 at 5:35 AM Kevin Boudloche notifications@github.com wrote:

SO question for added context: http://stackoverflow.com/questions/37303900/see-response-in-console-preview-tab-console-log-returns-undefined-ajax-call

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/jpillora/xdomain/issues/188#issuecomment-220134394