{"name":"popsicle-transport-http","version":"1.0.7","description":"Popsicle transport for sending requests over HTTP1 and HTTP2","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prettier":"prettier --write","lint":"tslint \"src/**/*.ts\" --project tsconfig.json","format":"npm run prettier -- \"*.{md,yml,yaml}\" \"src/**/*.{js,jsx,ts,tsx}\"","build":"rimraf dist && tsc","specs":"HTTPS_PORT=7358 PORT=7357 jest --coverage --detectOpenHandles","server:open":"PORT=7357 node scripts/http-server.js & echo $! > server.pid; HTTPS_PORT=7358 node scripts/https-server.js & echo $! > https-server.pid","server:close":"if [ -f server.pid ]; then kill -9 $(cat server.pid); rm server.pid; fi; if [ -f https-server.pid ]; then kill -9 $(cat https-server.pid); rm https-server.pid; fi","test":"npm run lint && npm run build && npm run server:open && npm run specs; EXIT=$?; npm run server:close; exit $EXIT","prepare":"npm run build"},"repository":{"type":"git","url":"git://github.com/serviejs/popsicle-transport-http.git"},"keywords":["popsicle","transport","http","http2","response"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/serviejs/popsicle-transport-http/issues"},"homepage":"https://github.com/serviejs/popsicle-transport-http","jest":{"roots":["<rootDir>/src/"],"transform":{"\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,json,css,md,yml,yaml}":["npm run prettier","git add"]},"publishConfig":{"access":"public"},"peerDependencies":{"servie":"^4.2.0"},"devDependencies":{"@types/jest":"^24.0.13","@types/node":"^12.0.7","@types/pump":"^1.1.0","express":"^4.17.1","husky":"^3.0.9","jest":"^24.8.0","lint-staged":"^9.4.2","prettier":"^1.18.2","servie":"^4.3.2","throwback":"^4.1.0","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","typescript":"^3.5.1"},"dependencies":{"make-error-cause":"^2.2.0","pump":"^3.0.0"},"gitHead":"7b9ca7eca5d552ba41bf3c374d41db8009134565","_id":"popsicle-transport-http@1.0.7","_nodeVersion":"13.7.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UVpbAfJn9Z19A84WdIklHzbK8EHt7o1w0u6JEkAx6BTlkSxI6T2Lo5Vr989YO8pPmbFZhNClz3Eir8fldAYWpQ==","shasum":"a20bf0dd3a42d4acd55fb9cf34e8cff47789ba49","tarball":"http://registry-npm.ywwl.com/popsicle-transport-http/download/popsicle-transport-http-1.0.7.tgz","fileCount":9,"unpackedSize":93034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeNjHKCRA9TVsSAnZWagAApioP/Rw0iv7T2j0a3yjOz3A9\n+c7Enu32LYzeJmLf5B4VjLPd+jpdavH1dChbQOwbMSRISLghXhP2QU0f5sGv\nL4vw2YjTSveb7LPHUHSF27OhxJzuURUg5YHUOs91pUkbDKI4EDDLS6lNgaQ9\n4kUjw7TcoQNjJ0g+7C4RTiOQJVVzI1+yWUfJIhzG1kRGpSMzp3qowVOvLWoe\nXKrtsja0iVfCIAgsRKnmpymjDXXscQCLKxoWF5rIP/QGMJJR8E3pD3c2LCBW\nn3jfaQilmL/ryMqXRKZJ3Rxq7NaHaMIFJYtYo1r3tPsyRJoJWnhQd2/SnE5y\nqmPciLSF1QwZV6UYsA4pAZZRq5PrTOAQAUMMf2+Vyl/zliT1IDj/soQkAqzp\nFTVHMJaNnD1UKJdwof4END2a9ZGSkULptbg34l1biRqEnMd7aVIy3LyK85Pz\nAYUw9dR9kccdNfqEEgiX2KyKPvfioVgjrym9OuhzWf3COBF9pN8fdxvKVZAr\nzWf42Vi6Ll3FyLSnQ/4poWcn0scQJx5/4JHTEK4jEqF0i8yqdgxHd97VRXn+\nQ9h3yL3ZXfyiioJfgGQTjIS6ZloIy+cOiPWkezndkrBSlKcVoc4oIOx3Qf8G\nbvECw9KhxOgzCpHTIZrqJy4fVj1ubZ40ksavisPDzI0VOFP4GJllp9o1uX6F\nidWK\r\n=z81Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChGH0TTR1LxSfU8gSt+7MijwLpHcIn1G9s76Q34fRtJQIhAKskgnrlz3bbj8+ufEcD7QsQHfXyd5Phgf8ND3fCtbB3"}],"size":19972,"noattachment":false,"key":"/popsicle-transport-http/-/popsicle-transport-http-1.0.7.tgz"},"maintainers":[{"name":"blakeembrey","email":"hello@blakeembrey.com"}],"_npmUser":{"name":"blakeembrey","email":"hello@blakeembrey.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/popsicle-transport-http_1.0.7_1580609993706_0.5865620047687989"},"_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":1580609993827,"_cnpm_publish_time":1580609993827,"dist-tags":{"latest":"1.2.1"}}