Permalink
Browse files

index: make `request` overrideable

  • Loading branch information...
rauchg committed Feb 12, 2013
1 parent ed260b6 commit bc2e8f8ee4b2201b96e5ffa8c6e660358d150900
Showing with 8 additions and 2 deletions.
  1. +8 −2 index.js
View
@@ -10,7 +10,13 @@ var debug = require('debug')('mandrill');
* Module exports.
*/
-module.exports = create;
+module.exports = exports = create;
+
+/**
+ * Make transport overrideable.
+ */
+
+exports.request = request;
/**
* Create client.
@@ -71,7 +77,7 @@ function create(key){
function send(key, message, fn){
debug('sending message %j with api key "%s"', message, key);
- request
+ exports.request
.post('https://mandrillapp.com/api/1.0/messages/send.json')
.send({ key: key, message: message })
.end(function(err, res){

0 comments on commit bc2e8f8

Please sign in to comment.