UNPKG

http2-client

Version:

Drop-in replacement for Nodes http and https that transparently make http request to both http1 / http2 server, it's using the ALPN protocol

17 lines (13 loc) 376 B
const { HttpRequest,ClientRequest } = require('./request'); const globalManager = HttpRequest.globalManager; const request = globalManager.request.bind(globalManager); const get = globalManager.get.bind(globalManager); const http = Object.assign({},require('http')); module.exports = Object.assign(http , { ClientRequest, globalManager, request, get })