ZAjax – a Javascript library to send Ajax request – GET/POST – JOSN


Hello Developers,

I have written a library which helps to send and process AJAX requests with JSON data. Right now it accepts HTTP GET and HTTP POST Json requests. You can download from below repository

https://github.com/swagatblog/zAjax

You also can extend this to your requirement like POST stream, GET custom object etc.

Sample code to use this:

****************************************************************

 var url=’http://yourapiurl.com/getinfi’;

var requestType=’GET’;

var data={id:1120}; //JSON data

var successCallback= function(response){

//implement your code

};

var failureCallback= function(response){

//implement your code

};

var contentType = ‘application/json’;

ZScript.Ajax.send-request(url, requestType, contentType, data, successCallback, failureCallback);

This is a very simple to use library and sample shows how to send a GET request .

Best Regards

Swagat

Advertisements

2 thoughts on “ZAjax – a Javascript library to send Ajax request – GET/POST – JOSN

  1. Awesome library. Made my life easier and powerful with AJAX calls. I went ahead and extended zAjax .. Thanks for posting such a helpful source.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s