How can I get more information on whats going wrong with my http or rest code

I have set up a http/rest server for testing. It works fine with the browser and in a test client app in vcl. But the identical thing in TMS gives error 0 (in the OnError event). It works with the TMS url in the demo. But it doesnt work with my server or with a local fibaro unit. Which both work with vcl and fmx clients I have done in the past.

What does error 0 mean ? And how can I get more information ion whats going wrong ?

Is the browser console not giving more information, details?

I get similar errors to this, they vary depending on what I am trying.

HTTP request error @http://localhost:8080/datasnap/rest/Methods/Test_String | fMessage::HTTP request error @http://localhost:8080/datasnap/rest/Methods/Test_String FJSError::Error: HTTP request error @http://localhost:8080/datasnap/rest/Methods/Test_String fHelpContext::0
at http://localhost:8000/Tms_Client/Tms_Client.js [259:48]

Sometimes it
unhandled javascript error

It could be because I havent set anything in the Headers property. What format are they supposed to be ? Is it full html like

'<meta http-equiv="Content-type" content="application/json">

Hi Bruno, found it.

The problem was the browser accessing localhost. It triggers the cross-site breach. I just tried on Firefox (I have an addon that can disable this on a page basis). When I disable it, the app works fine.

Suggestion, to save time for other people. Let the tmsweb http,rest,client components add a message to check for cross-site when you detect localhost.

We already tried to surface such message, but so far were unsuccessful. We couldn't find evidence yet the browser allows to surface this.