node/test/parallel/test-http-flush.js
Rich Trott abe8a344a5 test: remove unused variables form http tests
The http tests seem especially prone to including unused variables.
This change removes them.

PR-URL: https://github.com/nodejs/node/pull/4422
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-12-28 16:17:24 -08:00

17 lines
389 B
JavaScript

'use strict';
var common = require('../common');
var http = require('http');
http.createServer(function(req, res) {
res.end('ok');
this.close();
}).listen(common.PORT, '127.0.0.1', function() {
var req = http.request({
method: 'POST',
host: '127.0.0.1',
port: common.PORT,
});
req.flush(); // Flush the request headers.
req.flush(); // Should be idempotent.
});