q-reqwest

Thin Q promise wrapper for reqwest

Synopsis

A thin Q wrapper around ded's reqwest AJAX library.

Install

    npm install q-reqwest

Get the latest minified release and download it to your project.

You can load the q-reqwest module with an AMD or CommonJS module loader or use it via the reqwest property of the Q global with a script tag:

    <script src="/your/js/path/q.min.js"></script> 
    <script src="/your/js/path/q-reqwest.min.js"></script> 
    <script>/* You can use Q.reqwest here. */</script> 
    git clone https://github.com/pluma/q-reqwest.git
    cd q-reqwest
    npm install
    make && make min

API

Passes the given config object to reqwest and returns a Q promise that is resolved or rejected when the request terminates.

If config is a string, it will be passed as the url option. For a full list of options see the reqwest API documentation.

Shorthand for ajax({method: 'get'}).

post(config:Object):Q

Shorthand for ajax({method: 'post'}).

Shorthand for ajax({method: 'delete'}).

Shorthand for ajax({method: 'patch'}).

Contains the default options that will be used by ajax.

License

The MIT/X11 license.