mirror of
https://github.com/smartyellow/status.git
synced 2024-11-21 23:19:01 +01:00
22 lines
496 B
JavaScript
22 lines
496 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const realValueNames = {
|
||
|
httpstatus: 'HTTP status code',
|
||
|
body: 'Response body',
|
||
|
bodylength: 'Response body length',
|
||
|
ok: 'Response OK?',
|
||
|
redir: 'Redirected?',
|
||
|
restype: 'Response type',
|
||
|
};
|
||
|
|
||
|
const realValues = {
|
||
|
httpstatus: ({ res }) => res.status,
|
||
|
body: ({ body }) => body,
|
||
|
bodylength: ({ body }) => body.length,
|
||
|
ok: ({ res }) => res.ok,
|
||
|
redir: ({ res }) => res.redirected,
|
||
|
restype: ({ res }) => res.type,
|
||
|
};
|
||
|
|
||
|
module.exports = { realValueNames, realValues };
|