Browse Source

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>
v6
maasencioh 8 years ago
committed by James M Snell
parent
commit
accf410eb0
  1. 6
      lib/http.js

6
lib/http.js

@ -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;

Loading…
Cancel
Save