{"bugs":{"url":"https://github.com/hapijs/shot/issues"},"dist":{"shasum":"cccf109e492abc9c80cfac89a87d3e0e9ef8a1cf","tarball":"https://registry.npmjs.org/shot/-/shot-3.5.2.tgz","fileCount":8,"integrity":"sha512-5IBT7mmyi2XWGh0qY2zH8bixmWPuPVG5QtWDm9dt2pxEufA3t4MUA99ZIdG3e4RdcVLeg2fZvoh+8R8qg1m6BQ==","signatures":[{"sig":"MEYCIQDj3qOkNbVhojy6yoXFCFKB5jInE4gRdk/DPGZPEb4y3gIhAIWEn2O9EqLMoXU2SBAG9TEJZod58JO6Lrdkv8XV34dE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11895},"main":"lib/index.js","name":"shot","readme":"# shot\n\nInjects a fake HTTP request/response into a node HTTP server for simulating server logic, writing tests, or debugging. Does not use a socket\nconnection so can be run against an inactive server (server not in listen mode).\n\n[![Build Status](https://travis-ci.org/hapijs/shot.svg?branch=v3-commercial)](https://travis-ci.org/hapijs/shot)\n\n## Example\n\n```javascript\n// Load modules\n\nconst Http = require(\"http\");\nconst Shot = require(\"shot\");\n\n// Declare internals\n\nconst internals = {};\n\ninternals.main = function () {\n  const dispatch = function (req, res) {\n    const reply = \"Hello World\";\n    res.writeHead(200, {\n      \"Content-Type\": \"text/plain\",\n      \"Content-Length\": reply.length,\n    });\n    res.end(reply);\n  };\n\n  const server = Http.createServer(dispatch);\n\n  Shot.inject(dispatch, { method: \"get\", url: \"/\" }, (res) => {\n    console.log(res.payload);\n  });\n};\n\ninternals.main();\n```\n\nNote how `server.listen` is never called.\n\n## API\n\nSee the [API Reference](API.md)\n","engines":{"node":">=6.0.0"},"gitHead":"04f17634faa0697a14052ec685665a95fa00ad76","license":"SEE LICENSE IN LICENSE.md","scripts":{"test":"lab -a code -t 100 -L -l","test-cov-html":"lab -a code -r html -o coverage.html -L -l"},"_npmUser":{"name":"nargonath","email":"jonas.pauthier@gmail.com"},"homepage":"https://github.com/hapijs/shot#readme","keywords":["utilities","http","debug","test"],"deprecated":"This module has moved and is now available at @hapi/shot. Please update your dependencies as this version is no longer maintained and may contain bugs and security issues.","repository":{"url":"git://github.com/hapijs/shot.git","type":"git"},"_npmVersion":"10.2.1","description":"Injects a fake HTTP request/response into a node HTTP server","directories":{},"maintainers":[{"name":"nargonath","email":"jonas.pauthier@gmail.com"},{"name":"devinivy","email":"devinivy@gmail.com"},{"name":"marsup","email":"nicolas@morel.io"},{"name":"nlf","email":"quitlahok@gmail.com"}],"_nodeVersion":"18.18.1","dependencies":{"joi":"12.x.x","hoek":"4.x.x"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"lab":"14.x.x","code":"4.x.x"},"_npmOperationalInternal":{"tmp":"tmp/shot_3.5.2_1704533862545_0.0772118333189078","host":"s3://npm-registry-packages"},"_id":"shot@3.5.2","version":"3.5.2"}