servant/examples/www/api.js
2014-12-01 17:36:18 +01:00

20 lines
300 B
JavaScript

function postcounter(onSuccess, onError)
{
$.ajax(
{ url: '/counter'
, success: onSuccess
, error: onError
, type: 'POST'
});
}
function getcounter(onSuccess, onError)
{
$.ajax(
{ url: '/counter'
, success: onSuccess
, error: onError
, type: 'GET'
});
}