http: name anonymous functions in http

Refs: https://github.com/nodejs/node/issues/8913
PR-URL: https://github.com/nodejs/node/pull/9055
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
maasencioh 2016-10-13 13:01:28 +02:00 committed by James M Snell
parent 02c3c205f1
commit accf410eb0

View File

@ -15,18 +15,18 @@ exports.STATUS_CODES = server.STATUS_CODES;
exports._connectionListener = server._connectionListener;
const Server = exports.Server = server.Server;
exports.createServer = function(requestListener) {
exports.createServer = function createServer(requestListener) {
return new Server(requestListener);
};
const client = require('_http_client');
const ClientRequest = exports.ClientRequest = client.ClientRequest;
exports.request = function(options, cb) {
exports.request = function request(options, cb) {
return new ClientRequest(options, cb);
};
exports.get = function(options, cb) {
exports.get = function get(options, cb) {
var req = exports.request(options, cb);
req.end();
return req;