# @hapi/shot

> Injects a fake HTTP request/response into a node HTTP server

Latest version **6.0.3** (published 2026-05-27) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @hapi/shot
pnpm add @hapi/shot
yarn add @hapi/shot
bun add @hapi/shot
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 6.0.3 |
| Published | 2026-05-27 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 18 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 196 |
| Maintainers | nlf, devinivy, wyatt, lloydbenson, cjihrig, marsup |
| Keywords | utilities, http, debug, test |

## Links

- npm: https://www.npmjs.com/package/@hapi/shot
- Repository: https://github.com/hapijs/shot
- Homepage: https://github.com/hapijs/shot#readme
- Issues: https://github.com/hapijs/shot/issues
- npm.io page: https://npm.io/package/@hapi/shot

## Dependencies (2)

- [@hapi/hoek](https://npm.io/package/@hapi/hoek.md) ^11.0.2
- [@hapi/validate](https://npm.io/package/@hapi/validate.md) ^2.0.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 6.0.3 (latest) — 2026-05-27
- 6.0.0-beta.1 (next) — 2022-04-25
- 6.0.2 — 2025-08-13
- 6.0.1 — 2023-02-11
- 6.0.0 — 2022-05-09
- 6.0.0-beta.0 — 2022-04-24
- 5.0.5 — 2021-01-23
- 5.0.4 — 2020-09-07
- 5.0.3 — 2020-08-25
- 5.0.2 — 2020-08-25
- 5.0.1 — 2020-08-10
- 5.0.0 — 2020-01-08
- 4.1.2 — 2019-09-12
- 4.1.1 — 2019-08-13
- 4.1.0 — 2019-04-02

## README

<a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>

# @hapi/shot

#### Injects a fake HTTP request/response into your node server logic.

**shot** is part of the **hapi** ecosystem and was designed to work seamlessly with the [hapi web framework](https://hapi.dev) and its other components (but works great on its own or with other frameworks). If you are using a different web framework and find this module useful, check out [hapi](https://hapi.dev) – they work even better together.

### Visit the [hapi.dev](https://hapi.dev) Developer Portal for tutorials, documentation, and support

## Useful resources

- [Documentation and API](https://hapi.dev/family/shot/)
- [Versions status](https://hapi.dev/resources/status/#shot) (builds, dependencies, node versions, licenses, eol)
- [Changelog](https://hapi.dev/family/shot/changelog/)
- [Project policies](https://hapi.dev/policies/)
- [Free and commercial support options](https://hapi.dev/support/)

---
_Source: https://npm.io/package/@hapi/shot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
