restler-promise

0.0.10 • Public • Published

restler-promise

NPM Version Downloads Build Status Greenkeeper badge

A restler wrapper for the Promises/A+ implementation of your choice.

    // You may need to install bluebird first
    var Promise = require("bluebird");
    var rest = require("restler-promise")(Promise);
    rest.get("http://google.com/").then(function (response) {
        console.log(response);
    }).catch(function (errorResult) {
        // Note, the errorResult is an object containing an "error" property holding
        // the Error object and an optional "response" property holding the the response
        // object (if any). The response object will be missing, for example, if there is
        // no response from server.
        console.log(errorResult);
    });

License

Copyright (c) 2015-2018, Marcus Wittig and contributors. All rights reserved.

MIT License

Readme

Keywords

Package Sidebar

Install

npm i restler-promise

Weekly Downloads

81

Version

0.0.10

License

MIT

Unpacked Size

6.05 kB

Total Files

5

Last publish

Collaborators

  • mwittig