-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Hi,
I'm using windows 8.1, node 0.10.36
var inquirer = require('inquirer');
var http = require("http");
var querystring = require("querystring");
var prompt = inquirer.createPromptModule();
function httpRequest() {
var postData = querystring.stringify({
'msg' : 'Hello World!'
});
var options = {
hostname: 'www.google.com',
port: 80,
path: '/upload',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': postData.length
}
};
var req = http.request(options, function(res) {
console.log('STATUS: ' + res.statusCode);
console.log('HEADERS: ' + JSON.stringify(res.headers));
res.once('data', function (chunk) {
prompt([{
name: 'test',
message: 'Enter a test value in ON DATA !!!!!!',
type: 'list',
choices: ['Option1', 'Option2', 'Option3']
}], function (result) {
console.log('PROMPTER CALLBACK!');
});
});
});
req.on('error', function(e) { });
// write data to request body
req.write(postData);
req.end();
};
httpRequest();
This renders as expected but you can't interact with it.
The problem is reproduced on Windows 8.x with node 0.10.x using cmd or git bash. I've tested it with node 0.12 and it works.
Metadata
Metadata
Assignees
Labels
No labels