MCPcopy Create free account
hub / github.com/fastify/fastify / buildRegularRequest

Function buildRegularRequest

lib/request.js:71–94  ·  view source on GitHub ↗
(R)

Source from the content-addressed store, hash-verified

69}
70
71function buildRegularRequest (R) {
72 const props = R.props.slice()
73 function _Request (id, params, req, query, log, context) {
74 this.id = id
75 this[kRouteContext] = context
76 this.params = params
77 this.raw = req
78 this.query = query
79 this.log = log
80 this.body = undefined
81
82 let prop
83 for (let i = 0; i < props.length; i++) {
84 prop = props[i]
85 this[prop.key] = prop.value
86 }
87 }
88 Object.setPrototypeOf(_Request.prototype, R.prototype)
89 Object.setPrototypeOf(_Request, R)
90 _Request.props = props
91 _Request.parent = R
92
93 return _Request
94}
95
96function getLastEntryInMultiHeaderValue (headerValue) {
97 // we use the last one if the header is set more than once

Callers 2

buildRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected