MCPcopy
hub / github.com/fastify/fastify / buildRegularRequest

Function buildRegularRequest

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

Source from the content-addressed store, hash-verified

68}
69
70function buildRegularRequest (R) {
71 const props = R.props.slice()
72 function _Request (id, params, req, query, log, context) {
73 this.id = id
74 this[kRouteContext] = context
75 this.params = params
76 this.raw = req
77 this.query = query
78 this.log = log
79 this.body = undefined
80
81 let prop
82 for (let i = 0; i < props.length; i++) {
83 prop = props[i]
84 this[prop.key] = prop.value
85 }
86 }
87 Object.setPrototypeOf(_Request.prototype, R.prototype)
88 Object.setPrototypeOf(_Request, R)
89 _Request.props = props
90 _Request.parent = R
91
92 return _Request
93}
94
95function getLastEntryInMultiHeaderValue (headerValue) {
96 // 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