{"name":"popsicle-transport-http","version":"1.2.0","publishConfig":{"access":"public"},"description":"Popsicle transport for sending requests over HTTP1 and HTTP2","license":"MIT","repository":{"type":"git","url":"git://github.com/serviejs/popsicle-transport-http.git"},"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"homepage":"https://github.com/serviejs/popsicle-transport-http","bugs":{"url":"https://github.com/serviejs/popsicle-transport-http/issues"},"main":"dist/index.js","scripts":{"format":"ts-scripts format","lint":"ts-scripts lint","prepare":"ts-scripts install && ts-scripts build","specs":"ts-scripts specs -f","test":"ts-scripts test -f"},"keywords":["popsicle","transport","http","http2","response"],"peerDependencies":{"servie":"^4.2.0"},"dependencies":{"make-error-cause":"^2.2.0"},"devDependencies":{"@borderless/ts-scripts":"^0.5.0","@types/jest":"^27.0.2","@types/node":"^16.11.7","servie":"^4.3.3","throwback":"^4.1.0","typescript":"^4.2.3"},"types":"dist/index.d.ts","gitHead":"09e61c91df1248762668345f45bcbec7206cbb7e","_id":"popsicle-transport-http@1.2.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-cGYBZ6WIFS1HmIuz96hEeEnRCGH8xGqud68RTLVi8t6Kn2Noc1yP2nq81YgDKcuWMx34WFI9iEUbq5QLX+EcBg==","shasum":"4cb4e94f4365d2b1877694e5f02b5d9369e5b602","tarball":"http://registry-npm.ywwl.com/popsicle-transport-http/download/popsicle-transport-http-1.2.0.tgz","fileCount":15,"unpackedSize":169626,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCooVhBonlek8ZR2yUlX1fg2GbMB5p2yfteCP1GikmRgAIhAJAmpQ9ZSkutYgsf53vDOaUGmwuPqIA6xhk0l0M+FLso"}],"size":30550,"noattachment":false,"key":"/popsicle-transport-http/-/popsicle-transport-http-1.2.0.tgz"},"_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"directories":{},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/popsicle-transport-http_1.2.0_1636696579265_0.11146389824168468"},"_hasShrinkwrap":false,"readme":"# Popsicle Transport HTTP\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][build-image]][build-url]\n[![Build coverage][coverage-image]][coverage-url]\n\n> Popsicle transport for sending requests over HTTP1 and HTTP2.\n\n## Installation\n\n```\nnpm install popsicle-transport-http --save\n```\n\n## Usage\n\n```js\nimport { transport } from \"popsicle-transport-http\";\n\nconst req = new Request(\"/\");\nconst res = await transport()(req, done);\n```\n\n### Transport Options\n\nThe `transport` function sends the Servie `Request` to a remote server.\n\n- `keepAlive?: number` Duration to keep connection alive for re-use (default: `5000`)\n- `servername?: string` Override remote server name for TLS\n- `rejectUnauthorized?: boolean` Rejects unauthorized TLS connections\n- `negotiateHttpVersion?: NegotiateHttpVersion` Configure HTTP version negotiation (default: `HTTP2_FOR_HTTPS`)\n- `lookup?: DnsLookup` Override default DNS resolution (default: `dns.lookup`)\n- TLS options:\n  - `ca?: string | Buffer | Array<string | Buffer>` Set TLS CA\n  - `cert?: string | Buffer` Set TLS certificate\n  - `key?: string | Buffer` Set TLS key\n  - `secureContext?: SecureContext` Set TLS secure context\n  - `secureProtocol?: string` Set TLS secure protocol\n  - `secureOptions?: number` Set TLS secure options\n- Custom connection managers (default: `Infinity` active sockets):\n  - `tlsSockets?: ConnectionManager<TLSSocket>`\n  - `netSockets?: ConnectionManager<Socket>`\n  - `http2Sessions?: ConnectionManager<ClientHttp2Session>`\n- Custom create connections (all methods support async promises):\n  - `createHttp2Connection?: (authority, socket) => ClientHttp2Session`\n  - `createNetConnection?: (options) => Socket`\n  - `createTlsConnection?: (options) => TLSSocket`\n\n## TypeScript\n\nThis project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/popsicle-transport-http.svg?style=flat\n[npm-url]: https://npmjs.org/package/popsicle-transport-http\n[downloads-image]: https://img.shields.io/npm/dm/popsicle-transport-http.svg?style=flat\n[downloads-url]: https://npmjs.org/package/popsicle-transport-http\n[build-image]: https://img.shields.io/github/workflow/status/serviejs/popsicle-transport-http/CI/main\n[build-url]: https://github.com/serviejs/popsicle-transport-http/actions/workflows/ci.yml?query=branch%3Amain\n[coverage-image]: https://img.shields.io/codecov/c/gh/serviejs/popsicle-transport-http\n[coverage-url]: https://codecov.io/gh/serviejs/popsicle-transport-http\n","publish_time":1636696579469,"_cnpm_publish_time":1636696579469,"dist-tags":{"latest":"1.2.1"}}