You are not logged in.
Pages: 1
I've tried the demo Rest web Service server/client written in Delphi. So, Ok, the "Delphi" client can connect to the "Delphi" server. Can someone PLEASE post an example of connecting to the Delphi Rest Web Service (server) using "Javascript"?
I am simply trying to execute the example "Sum" function that is found in the demo server.
This is what I have (my server listens on port 8089): All I get is a Error: Timeout: Undefined.
<JAVASCRIPT>
var dataObj = {};
dataObj['A'] = '1';
dataObj['B'] = '2';
$.ajax({
url: 'http://localhost:8089/Sum',
type: 'GET',
data: dataObj,
contenttype: 'application/json; charset=utf-8',
dataType: 'jsonp',
timeout: 10000,
success: function(data, textStatus, jqXHR){
alert(textStatus);
$('#the_result').val( data.name );
},
error: function(jqXHR, textStatus, errorThrown){
alert('Error:'+textStatus+': '+errorThrown+'\n'+jqXHR.responseText );
},
jsonpCallback: 'JsonpCallback'
});
}
</JAVASCRIPT>
A lot of posts mention how easy it is to use morMot, however, I've been spinning my wheels for days, "Googled" half a million pages, and cannot seem to find the answer.
Any help would be very much appreciated.
Richard
Pages: 1