{"name":"popsicle-transport-http","version":"1.1.2","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":"HTTP2_PORT=7359 HTTPS_PORT=7358 PORT=7357 jest --coverage --detectOpenHandles","prespecs":"PORT=7357 node scripts/http-server.js & echo $! > server.pid; HTTPS_PORT=7358 node scripts/https-server.js & echo $! > https-server.pid; HTTP2_PORT=7359 node scripts/http2-server.js & echo $! > http2-server.pid","postspecs":"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; if [ -f http2-server.pid ]; then kill -9 $(cat http2-server.pid); rm http2-server.pid; fi","test":"npm run lint && npm run build && npm run specs","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"},"publishConfig":{"access":"public"},"peerDependencies":{"servie":"^4.2.0"},"devDependencies":{"@types/jest":"^26.0.0","@types/node":"^14.0.13","@types/pump":"^1.1.0","express":"^4.17.1","husky":"^4.2.5","jest":"^26.0.1","lint-staged":"^10.2.9","prettier":"^2.0.5","servie":"^4.3.3","throwback":"^4.1.0","ts-jest":"^26.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3"},"dependencies":{"make-error-cause":"^2.2.0"},"gitHead":"c5596d6a11d318e45b6f39449e7e570002b1ada1","_id":"popsicle-transport-http@1.1.2","_nodeVersion":"15.8.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-1OugZ5Ge0a9hhjMH/wKJoFHifNyj4uUbQWlvpv9T1mS2icLPgR8Ym+StVxe+T9sMG23JDHWt7nyej/wCA4KLig==","shasum":"bc8896f44c36f116f605c1c69dc93b87e05fe099","tarball":"http://registry-npm.ywwl.com/popsicle-transport-http/download/popsicle-transport-http-1.1.2.tgz","fileCount":9,"unpackedSize":116435,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKIJvCRA9TVsSAnZWagAAP1sP/1BhY8TkArEGKPFD42VX\n79KTEGdgSWoxgbDNiEBeWXpWQBLAs0sroavgJR08Wy8zwICHRhB60ue/e5Gr\n0cq/Ife5dsrfo0AvRtiPM1AmhgX4yvC6M8OliR6Jzw532Vw+ObFqSMOlerTg\ns1lrQt87MjjKwB8Jin7i65YFoY1FciUnsDDsK+fBpjcOJcgBCHVcLXjvZoBw\nRexQKfl+YaekXAMCLiQCc+G+KZdwbjDDgHc8vx5BkrMQayjlfof4qFRWX5E+\nCe8FooNhCTCYU5qc5zpTMoMf2WRvi5W0a10biwQKAL+S4W9iT3KGOvwmbSIk\nmEPZzRw1gMqHJvPKPdUPq67XwC8BKPeSil/PZfSjPGksEThYCyZeFGF59eF/\nb4F5uOpR3J71+lMf6ihf1XFXM2zPseeVBAkdNQyhaXnHDWi4mW13wUuYEqyp\nWUUpgYg+m5czjQ+zMKh4uhFiHq+6f58yY4RGa3LyB1jwmShZn9URSzJNFw0+\na1JfZkStgXTJUfBM4VFk26Gsy/5LxK2yWt2iyPln7oFI3bhmeZuZxwYdun3B\n60vPepQDi08bySGGpLu74fEdTqmhbNYegKDI1+z5xNdaWhgnqn7xZ6MlLWts\n0JIWcLbLuWmlgu5R4AYe4A9ZvV6HUcwtOy1NgmDwDShSCd5OXIvc+NoVl0Ag\nzpal\r\n=F0jH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+OYcmf9oXGapTulVi4AtCwrgbidAnVKRaCJe9D8OUIwIhAOBVt8rBbmc2lxt6CRJmAMxbCP0k00Y8r4SeM9ieupV0"}],"size":24536,"noattachment":false,"key":"/popsicle-transport-http/-/popsicle-transport-http-1.1.2.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.1.2_1613267567041_0.09567711442385685"},"_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":1613267567198,"_cnpm_publish_time":1613267567198,"dist-tags":{"latest":"1.2.1"}}