Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mwittig/restler-promise
A restler wrapper for the Promises/A+ implementation of your choice
https://github.com/mwittig/restler-promise
api-wrapper promise rest restler restler-promise wrapper
Last synced: about 6 hours ago
JSON representation
A restler wrapper for the Promises/A+ implementation of your choice
- Host: GitHub
- URL: https://github.com/mwittig/restler-promise
- Owner: mwittig
- License: mit
- Created: 2015-08-22T16:06:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T13:59:55.000Z (over 6 years ago)
- Last Synced: 2024-10-30T14:49:20.116Z (16 days ago)
- Topics: api-wrapper, promise, rest, restler, restler-promise, wrapper
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# restler-promise
[![NPM Version](https://img.shields.io/npm/v/restler-promise.svg?style=flat)](https://www.npmjs.com/package/restler-promise) ![Downloads](https://img.shields.io/npm/dm/restler-promise.svg?style=flat) [![Build Status](https://travis-ci.org/mwittig/restler-promise.svg?branch=master)](https://travis-ci.org/mwittig/restler-promise)
[![Greenkeeper badge](https://badges.greenkeeper.io/mwittig/restler-promise.svg)](https://greenkeeper.io/)A [restler](https://github.com/danwrong/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](https://github.com/mwittig/logger-winston/blob/master/LICENSE)