Skip to content

mwittig/restler-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published