source: Dev/trunk/src/node_modules/request/tests/test-localAddress.js @ 484

Last change on this file since 484 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 399 bytes
Line 
1var request = require('../index')
2  , assert = require('assert')
3  ;
4
5request.get({
6  uri: 'http://www.google.com', localAddress: '1.2.3.4' // some invalid address
7}, function(err, res) {
8  assert(!res) // asserting that no response received
9})
10
11request.get({
12  uri: 'http://www.google.com', localAddress: '127.0.0.1'
13}, function(err, res) {
14  assert(!res) // asserting that no response received
15})
Note: See TracBrowser for help on using the repository browser.