accepts
accepts copied to clipboard
Ability to add additional types
It would be nice to add types so that the following would work.
// Accepts: application/hal+json
const accept = accepts(req);
switch(accept.type(['json', 'html'])) {
case 'json':
// would match both application/json and application/hal+json
default:
//
}