# hapi-request-id

> A Hapi.js plugin for setting request ID from request ID headers

Latest version **1.1.0** (published 2016-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install hapi-request-id
pnpm add hapi-request-id
yarn add hapi-request-id
bun add hapi-request-id
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-02-08 |
| First published | 2015-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Jonathan Clem |
| Maintainers | jclem |
| Keywords | hapi, request-id |

## Links

- npm: https://www.npmjs.com/package/hapi-request-id
- Repository: https://github.com/usecanvas/hapi-request-id
- Homepage: https://github.com/usecanvas/hapi-request-id#readme
- Issues: https://github.com/usecanvas/hapi-request-id/issues
- npm.io page: https://npm.io/package/hapi-request-id

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-02-08
- 1.0.0 — 2015-12-15

## README

# Hapi Request ID

This module is a plugin for Hapi.js that sets the `id` property of each Hapi.js
request object on a server to the value of that request's
[`X-Request-ID` header][heroku-http-request-id]. This makes it easier to
corrolate requests across multiple Hapi applications and things like the
Heroku routing stack.

## Usage

```javascript
const Hapi      = require('hapi');
const RequestID = require('hapi-request-id');
const server    = new Hapi.Server();

server.register([
  RequestID
], function(err) {
  /* etc. */
});

// You can also specify any arbitrary header to set as the request ID
server.register({
  register: RequestID,
  options: { header: 'x-my-custom-id-header' }
}, function(err) {
  /* etc. */
});

```

[heroku-http-request-id]: https://devcenter.heroku.com/articles/http-request-id

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