@jojopr/miniajax

    0.1.3 • Public • Published

    miniAJAX JavaScript library

    miniAJAX is a small JavaScript library for AJAX Request

    How to use

    AJAX.GET('url', {
        '200': function(data) {
            // Called on HTTP 200, data = XMLHttpRequest.ResponseText
        },
        '404': function(data) {
            // Called on HTTP 404, data = XMLHttpRequest.ResponseText
        }
    })

    The AJAX.GET(url, callbacks = {}) takes a url for the request and an object, holding callback functions, stored by key = HTTP Status Code and value = function(data)

    install

    npm i @jojopr/miniAJAX

    <script src="node_modules/@jojopr/miniajax/dist/miniAJAX.min.js"></script>

    TODO:

    • Add Support for POST Requests

    Install

    npm i @jojopr/miniajax

    DownloadsWeekly Downloads

    12

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    4.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • jojopr