IAdminUserExpressRequest
Extends
Omit<Request,"protocol"|"param"|"unshift">
Properties
aborted
aborted:
boolean
The message.aborted property will be true if the request has
been aborted.
Since
v10.1.0
Deprecated
Since v17.0.0,v16.12.0 - Check message.destroyed from stream.Readable.
Inherited from
Omit.aborted
accepted
accepted:
MediaType[]
Return an array of Accepted media types ordered from highest quality to lowest.
Inherited from
Omit.accepted
adminUser
adminUser:
AdminUser
app
app:
Application
Inherited from
Omit.app
baseUrl
baseUrl:
string
Inherited from
Omit.baseUrl
body
body:
any
Inherited from
Omit.body
closed
readonlyclosed:boolean
Is true after 'close' has been emitted.
Since
v18.0.0
Inherited from
Omit.closed
complete
complete:
boolean
The message.complete property will be true if a complete HTTP message has
been received and successfully parsed.
This property is particularly useful as a means of determining if a client or server fully transmitted a message before a connection was terminated:
const req = http.request({
host: '127.0.0.1',
port: 8080,
method: 'POST',
}, (res) => {
res.resume();
res.on('end', () => {
if (!res.complete)
console.error(
'The connection was terminated while the message was still being sent');
});
});
Since
v0.3.0
Inherited from
Omit.complete
connection
connection:
Socket
Alias for message.socket.
Since
v0.1.90
Deprecated
Since v16.0.0 - Use socket.
Inherited from
Omit.connection
cookies
cookies:
any
Inherited from
Omit.cookies
destroyed
destroyed:
boolean
Is true after readable.destroy() has been called.
Since
v8.0.0
Inherited from
Omit.destroyed
errored
readonlyerrored:Error
Returns error if the stream has been destroyed with an error.
Since
v18.0.0
Inherited from
Omit.errored
fresh
readonlyfresh:boolean
Check if the request is fresh, aka Last-Modified and/or the ETag still match.
Inherited from
Omit.fresh
headers
headers:
IncomingHttpHeaders
The request/response headers object.
Key-value pairs of header names and values. Header names are lower-cased.
// Prints something like:
//
// { 'user-agent': 'curl/7.22.0',
// host: '127.0.0.1:8000',
// accept: '*' }
console.log(request.headers);
Duplicates in raw headers are handled in the following ways, depending on the header name:
- Duplicates of
age,authorization,content-length,content-type,etag,expires,from,host,if-modified-since,if-unmodified-since,last-modified,location,max-forwards,proxy-authorization,referer,retry-after,server, oruser-agentare discarded. To allow duplicate values of the headers listed above to be joined, use the optionjoinDuplicateHeadersin request and createServer. See RFC 9110 Section 5.3 for more information. set-cookieis always an array. Duplicates are added to the array.- For duplicate
cookieheaders, the values are joined together with;. - For all other headers, the values are joined together with
,.
Since
v0.1.5
Inherited from
Omit.headers
headersDistinct
headersDistinct:
Dict<string[]>
Similar to message.headers, but there is no join logic and the values are
always arrays of strings, even for headers received just once.
// Prints something like:
//
// { 'user-agent': ['curl/7.22.0'],
// host: ['127.0.0.1:8000'],
// accept: ['*'] }
console.log(request.headersDistinct);
Since
v18.3.0, v16.17.0
Inherited from
Omit.headersDistinct
host
readonlyhost:string