We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL:http://nodeapi.ucdok.com/api/http.html#http_http_request_options_callback_3163 中文版的只有: // write data to request body req.write('data\n'); req.write('data\n'); req.end();
英文版的为: var options = { hostname: 'www.google.com', port: 80, path: '/upload', method: 'POST' };
var req = http.request(options, function(res) { console.log('STATUS: ' + res.statusCode); console.log('HEADERS: ' + JSON.stringify(res.headers)); res.setEncoding('utf8'); res.on('data', function (chunk) { console.log('BODY: ' + chunk); }); });
req.on('error', function(e) { console.log('problem with request: ' + e.message); });
// write data to request body req.write('data\n'); req.write('data\n'); req.end();
类似的情况在中文版API里还不少
The text was updated successfully, but these errors were encountered:
No branches or pull requests
URL:http://nodeapi.ucdok.com/api/http.html#http_http_request_options_callback_3163
中文版的只有:
// write data to request body
req.write('data\n');
req.write('data\n');
req.end();
英文版的为:
var options = {
hostname: 'www.google.com',
port: 80,
path: '/upload',
method: 'POST'
};
var req = http.request(options, function(res) {
console.log('STATUS: ' + res.statusCode);
console.log('HEADERS: ' + JSON.stringify(res.headers));
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log('BODY: ' + chunk);
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
// write data to request body
req.write('data\n');
req.write('data\n');
req.end();
类似的情况在中文版API里还不少
The text was updated successfully, but these errors were encountered: