Permalink
Browse files

fire 'complete' event from http_client

  • Loading branch information...
Nathan Nathan
Nathan authored and Nathan committed Nov 5, 2009
1 parent e18de6f commit 7d914e5471066ff0d543b87e3cb7c75cb1d13cba
Showing with 6 additions and 1 deletion.
  1. +1 −0 README.md
  2. +5 −1 lib/couchdb/http_client.js
View
@@ -0,0 +1 @@
+
@@ -52,7 +52,11 @@ HttpClient.prototype = (function() {
}
opts.success(results);
} else if (opts.error) {
- opts.error(req, req.responseText, req.status);
+ opts.error(req, req.responseText, req.status.toString());
+ }
+
+ if (typeof opts.complete === "function") {
+ opts.complete(req, req.status.toString());
}
},
get: function(uri, options){

0 comments on commit 7d914e5

Please sign in to comment.