Home / Function/ httpHeaderHandler() — fastify Function Reference

httpHeaderHandler() — fastify Function Reference

Architecture documentation for the httpHeaderHandler() function in reply.test-d.ts from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  8b09a10b_3dc0_f256_0657_4c200bc9f920["httpHeaderHandler()"]
  965f7b74_b8c6_ebf7_4bfd_8c4166a34585["reply.test-d.ts"]
  8b09a10b_3dc0_f256_0657_4c200bc9f920 -->|defined in| 965f7b74_b8c6_ebf7_4bfd_8c4166a34585
  style 8b09a10b_3dc0_f256_0657_4c200bc9f920 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

test/types/reply.test-d.ts lines 209–227

const httpHeaderHandler: RouteHandlerMethod = function (_request, reply) {
  // accept is a header provided by @types/node
  reply.getHeader('accept')
  /* eslint-disable @typescript-eslint/no-unused-expressions */
  reply.getHeaders().accept
  reply.hasHeader('accept')
  reply.header('accept', 'test')
  reply.headers({ accept: 'test' })
  reply.removeHeader('accept')

  // x-fastify-test is not a header provided by @types/node
  // and should not result in a typing error
  reply.getHeader('x-fastify-test')
  reply.getHeaders()['x-fastify-test']
  reply.hasHeader('x-fastify-test')
  reply.header('x-fastify-test', 'test')
  reply.headers({ 'x-fastify-test': 'test' })
  reply.removeHeader('x-fastify-test')
}

Domain

Subdomains

Frequently Asked Questions

What does httpHeaderHandler() do?
httpHeaderHandler() is a function in the fastify codebase, defined in test/types/reply.test-d.ts.
Where is httpHeaderHandler() defined?
httpHeaderHandler() is defined in test/types/reply.test-d.ts at line 209.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free