{"name":"popsicle-transport-http","version":"1.2.1","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":"ccdce339a70cd37f3168e8aa3784cf2cd840f284","_id":"popsicle-transport-http@1.2.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-i5r3IGHkGiBDm1oPFvOfEeSGWR0lQJcsdTqwvvDjXqcTHYJJi4iSi3ecXIttDiTBoBtRAFAE9nF91fspQr63FQ==","shasum":"35fdf4a59f429470b13b62f4223ec0249e3a163b","tarball":"http://registry-npm.ywwl.com/popsicle-transport-http/download/popsicle-transport-http-1.2.1.tgz","fileCount":15,"unpackedSize":176490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh229HCRA9TVsSAnZWagAAnQgQAIR1I7ZaWvbw4RLiCBLr\nC07FFljfF4XocMu7jqZDN53jBlC0H5N4xq7aOM1YlA16Hqs5imCGvo7gKaXJ\nBnxY/NC8YyZNY8IeWnBw2OhG9jBD9VHMQA7Os2WyujVtq57emqI9fhkBfSuD\nZNiE2GG92LtaCPnVIq7mQDO4rap8+8KTZGOY2fVCg4S06zJmvuOg1yYvQIxf\n02hnO37mV0m49UhWm6/BULI022vHHPbVlXMkqHsxPDlpU3wtFPMhvb9Zt6AJ\naqj8ztwYhOICrlYL6ZAgD1+3SRFQweCa+uibP3rQDNpFMRzgZKHc8/e7gJA0\njlTfdCi9FCMdNOwjXRBX8krX+BrXcYOfLI1G+aLHepwvJ/2kmZz6kBgOnD+d\n7WBvBIbO+l50aZSphPlJVzZJWN3fGiaNoGgBUME6yLLDksNhQHAhlWNSN/5p\nlfY30IgeSRYF+NqVaGztCf4QYllqEPk430AA/yi8I5b4sD5I6y+JD5mENM6t\nLJ2NtJI/ke8xIhkiMujA8iiMYcOq4bsSXb++vZd+T3+o0eddNZNmdlJ7TXx6\nLqJKP2nqgT0a7r4Nk2LJphr9Mf/xtmTlkawWjspp5SOidXbVmdVRMv4U14x9\ngPNwPEnzOK7uy1lrD+Od2ZXm2Ku/fXS2Mwdc42RSxkRaihRRFSzO6rPHvkPu\nBp7C\r\n=s6uy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWYEw+tIjAwQKHOhtfH7BP6iBeUmA6f8G9Xd4nCOecjQIgTinUtQkdmBszgzttN2YWW3meNrwOQpYAosN/rdCx7YM="}],"size":31049,"noattachment":false,"key":"/popsicle-transport-http/-/popsicle-transport-http-1.2.1.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.1_1637006293599_0.16729359080216621"},"_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":1637006293776,"_cnpm_publish_time":1637006293776,"dist-tags":{"latest":"1.2.1"}}