Need private packages and team management tools?Check out npm Teams »

popsicle-transport-http

1.0.7 • Public • Published

Popsicle Transport HTTP

NPM version NPM downloads Build status Test coverage

Popsicle transport for sending requests over HTTP1 and HTTP2.

Installation

npm install popsicle-transport-http --save

Usage

import { transport } from "popsicle-transport-http";
 
const req = new Request("/");
const res = await transport()(req, done);

Transport Options

The transport function sends the Servie Request to a remote server.

  • keepAlive?: number Duration to keep connection alive for re-use (default: 5000)
  • negotiateHttpVersion?: NegotiateHttpVersion Configure HTTP version negotiation (default: HTTP2_FOR_HTTPS)
  • servername?: string Override remote server name for TLS
  • rejectUnauthorized?: boolean Rejects unauthorized TLS connections
  • ca?: string | Buffer | Array<string | Buffer> Set TLS CA
  • cert?: string | Buffer Set TLS certificate
  • key?: string | Buffer Set TLS key
  • secureContext?: SecureContext Set TLS secure context
  • secureProtocol?: string Set TLS secure protocol

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

MIT

Install

npm i popsicle-transport-http

DownloadsWeekly Downloads

19,536

Version

1.0.7

License

MIT

Unpacked Size

93 kB

Total Files

9

Last publish

Collaborators

  • avatar