Commit 914a7be0 authored by Nicolai Kamenzky's avatar Nicolai Kamenzky
Browse files

Merge pull request #28 from hjpbarcelos/master

Exposes some promise methods
parents dce5fe77 dc5416a4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -128,6 +128,15 @@ request.Request.prototype.catch = function RP$catch(onRejected) {
    return this._rp_promise.catch.apply(this._rp_promise, arguments);
};

request.Request.prototype.finally = function RP$finally() {
    markPromiseInUse(this);
    return this._rp_promise.finally.apply(this._rp_promise);
};

request.Request.prototype.caught = request.Request.prototype.catch;

request.Request.prototype.lastly = request.Request.prototype.finally;

request.Request.prototype.promise = function RP$promise() {
    markPromiseInUse(this);
    return this._rp_promise;