Hi, I'm hitting a REST service that is running web2py that is supposed to return JSON. When I curl the endpoint or hit it in a browser, I get a valid 200 response with the JSON I expect in the body of the response. However, when I GET this same URL using Prototype's Ajax.Request function, I get a nil response in the body and a 0 status code. This is very strange to me. I am not a Python developer, so I have limited understanding of the situation, but this should work, right?
In *achem* Rails, I would do something like this on my controller to set up an appropriate response to an ajax request: respond_to do |format| format.js { render :text => "myjsonstuff" } end Is there something comparable in web2py or is there another way to get this thing working? I am assuming it has something to do with the XHR headers as curling the url works fine. Thanks, Alex --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---