Light HTTP

AJAX (GET)

        <script src="lightHttp.min.js">
        <script>
        var http = new window.lightHttp();
        http.ajax("test.html", {"count": 20}, function (content) {
            console.log(content);
        });
        </script>
    

AJAX (GET) Promise

        <script src="lightHttp.min.js">
        <script>
        var http = new window.lightHttp();
        http.ajax("test.html", {"count": 20})
            .then(function (content) {
                console.log(content);
            });
        </script>
    

JSONP Promise

        <script src="lightHttp.min.js">
        <script>
        var http = new window.lightHttp();
        http.jsonp("testJsonp.php", {"test":1}, function (resp) {
            console.log(resp);
        });
        </script>