mirror of https://github.com/lukechilds/node.git
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.
28 lines
661 B
28 lines
661 B
var assert = require('assert')
|
|
, request = require('../index')
|
|
, http = require('http')
|
|
;
|
|
|
|
var s = http.createServer(function(req, res) {
|
|
res.statusCode = 200;
|
|
res.end('');
|
|
}).listen(6767, function () {
|
|
|
|
// Test lowercase
|
|
request('http://localhost:6767', function (err, resp, body) {
|
|
// just need to get here without throwing an error
|
|
assert.equal(true, true);
|
|
})
|
|
|
|
// Test uppercase
|
|
request('HTTP://localhost:6767', function (err, resp, body) {
|
|
assert.equal(true, true);
|
|
})
|
|
|
|
// Test mixedcase
|
|
request('HtTp://localhost:6767', function (err, resp, body) {
|
|
assert.equal(true, true);
|
|
// clean up
|
|
s.close();
|
|
})
|
|
})
|