Home »
MCQs »
Express.js MCQs
Which of the following method can be used with any of the HTTP verbs: get, set, put, or delete?
7. Which of the following method can be used with any of the HTTP verbs: get, set, put, or delete?
- app.get(route, callback)
- res.send()
- app.listen(port, [host], [backlog], [callback]])
- app.method(path, handler)
Answer: D) app.method(path, handler)
Explanation:
app.method(path, handler) method can be used with any of the HTTP verbs: get, set, put, or delete.