The problem is server side.
Test code:
procedure TForm1.WebButton1Click(Sender: TObject);
begin
webhttprequest1.Headers.Clear;
webhttprequest1.URL := 'http://myserver.com/myendpoint';
webhttprequest1.Execute();
end;
procedure TForm1.WebHttpRequest1RequestResponse(Sender: TObject;
ARequest: TJSXMLHttpRequestRecord; AResponse: string);
begin
console.log(ARequest.req, AResponse);
end;
Errors in console:
Solve this by putting this JSON resource in the same domain as your web app or enable CORS on the backend. (This will depend on the type of backend you use).
For a background on CORS, please see:
For enabling CORS for XData this is explained in detail here: