Express.js · Method
res.format
res.format() selects a response handler by comparing the request's Accept header with the formats you provide. It sends 406 for no match unless you define a default handler.
Last updated
Syntax
res.format(object)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
req.accepts()res.send()res.json()res.set()res.type()