Http server API error

sup folks, im facing another problem now that i can't figure out what im doing wrong.
basically is everything working on the delphi end, i have a service what returns the data from one mapped entity by this uri:


this is working well too in the Advanced Rest Client (Chrome extension), but when i do the same thing using jquery i get this error (in portuguese):

  "Http server API error: A operação de E/S foi anulada devido uma saída da thread ou a uma requisição de aplicativo"

and what exactly im doing is this call:

  $.get("", function(data){
    alert("ops! fail");

this error doesnt help me to figure out what exactly im doing wrong.

well searching the google i found that the problem is that the brownser blocks the response for some secure reasons, here's output message it gives:

"XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access."

i little more research took me to this answer:

"If I understood it right you are doing an XMLHttpRequest to a different domain than your page is on. So the browser is blocking it as it usually allows a request in the same origin for security reasons. You need to do something different when you want to do a cross-domain request. A tutorial about how to achieve that is Using CORS."

reading the further reference, it seems to me that the server must allow this CORS headers to be send in other that both end could comunicate with each other.

digging the docs i couldn't find anything about header or these future so i guess this is not supported? is there a work around for this at my end?

In your TXDataServerModule, set AccessControlAllowOrigin to specify the allow origin header. You can set it to '' to accept requests from all origins:

XDataModule.AccessControlAllowOrigin := '';