Contains an array of the "media types" this request (req
) can accept (e.g. text/html
or application/json
), ordered from highest to lowest quality.
req.accepted;
req.accepted;
/*
[ { value: 'application/json',
quality: 1,
type: 'application',
subtype: 'json' },
{ value: 'text/html',
quality: 0.5,
type: 'text',
subtype: 'html' } ]
*/
- See the
accepts
module for the finer details of the header parsing algorithm used in Sails/Express/Koa/Connect.