You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
399 B

var request = require('../index')
, assert = require('assert')
;
request.get({
uri: 'http://www.google.com', localAddress: '1.2.3.4' // some invalid address
}, function(err, res) {
assert(!res) // asserting that no response received
})
request.get({
uri: 'http://www.google.com', localAddress: '127.0.0.1'
}, function(err, res) {
assert(!res) // asserting that no response received
})