mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
accf410eb0
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>
34 lines
992 B
JavaScript
34 lines
992 B
JavaScript
'use strict';
|
|
exports.IncomingMessage = require('_http_incoming').IncomingMessage;
|
|
|
|
exports.OutgoingMessage = require('_http_outgoing').OutgoingMessage;
|
|
|
|
exports.METHODS = require('_http_common').methods.slice().sort();
|
|
|
|
const agent = require('_http_agent');
|
|
exports.Agent = agent.Agent;
|
|
exports.globalAgent = agent.globalAgent;
|
|
|
|
const server = require('_http_server');
|
|
exports.ServerResponse = server.ServerResponse;
|
|
exports.STATUS_CODES = server.STATUS_CODES;
|
|
exports._connectionListener = server._connectionListener;
|
|
const Server = exports.Server = server.Server;
|
|
|
|
exports.createServer = function createServer(requestListener) {
|
|
return new Server(requestListener);
|
|
};
|
|
|
|
const client = require('_http_client');
|
|
const ClientRequest = exports.ClientRequest = client.ClientRequest;
|
|
|
|
exports.request = function request(options, cb) {
|
|
return new ClientRequest(options, cb);
|
|
};
|
|
|
|
exports.get = function get(options, cb) {
|
|
var req = exports.request(options, cb);
|
|
req.end();
|
|
return req;
|
|
};
|