Saturday, November 29, 2014

Calling remote JSON data web service url using

Here  is a sample code to call remote JSON data web service using JQuery Ajax call.

Use this simple javascript function when calling remote JSON data web service.

function callRemoteWebService(){
    var url = "htttp://someremote/web/service/url" ;
    $.ajax({
       
url:url,
        type: 'GET',
        dataType: 'json',
        timeout: 20000,
        error: function(errData){
            handleError(errData);
        },
        success: function(successData){
            handleError(
successData
);
        }
    });
}


Happy Coding !



No comments:

Post a Comment

All Blogs so far ...