Home / Function/ buildReply() — fastify Function Reference

buildReply() — fastify Function Reference

Architecture documentation for the buildReply() function in reply.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  72762f4f_4e39_4384_5920_490944e63821["buildReply()"]
  017fec44_8584_6b78_bc94_92f138a003b2["reply.js"]
  72762f4f_4e39_4384_5920_490944e63821 -->|defined in| 017fec44_8584_6b78_bc94_92f138a003b2
  style 72762f4f_4e39_4384_5920_490944e63821 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

lib/reply.js lines 933–961

function buildReply (R) {
  const props = R.props.slice()

  function _Reply (res, request, log) {
    this.raw = res
    this[kReplyIsError] = false
    this[kReplyErrorHandlerCalled] = false
    this[kReplyHijacked] = false
    this[kReplySerializer] = null
    this.request = request
    this[kReplyHeaders] = {}
    this[kReplyTrailers] = null
    this[kReplyStartTime] = undefined
    this[kReplyEndTime] = undefined
    this.log = log

    let prop

    for (let i = 0; i < props.length; i++) {
      prop = props[i]
      this[prop.key] = prop.value
    }
  }
  Object.setPrototypeOf(_Reply.prototype, R.prototype)
  Object.setPrototypeOf(_Reply, R)
  _Reply.parent = R
  _Reply.props = props
  return _Reply
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does buildReply() do?
buildReply() is a function in the fastify codebase, defined in lib/reply.js.
Where is buildReply() defined?
buildReply() is defined in lib/reply.js at line 933.

Analyze Your Own Codebase

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

Try Supermodel Free