scott
scott

Reputation: 3202

Express Js Router methods

I am new to expressjs and nodejs .I have found few methods in express router using visual studio code vs intellisense .For few of them i didn't found any documentation regarding below methods ,how exactly it can be used in real world like get,post,put,patch .So i thought to ask in stackoverflow.It might help everyone who are looking similar to this

const router = express.Router()
router.options
router.head
router.checkout
router.connect
router.copy
router.lock
router.merge
router.mkactivity
router.mkcol
router.move
router.'m-search'
router.notify
router.propfind
router.proppatch
router.purge
router.report
router.search
router.subscribe
router.trace
router.unlock
router.unsubscribe
router.apply
router.bind
router.arguments
router.caller
router.call

Upvotes: 0

Views: 547

Answers (1)

vintastic
vintastic

Reputation: 745

Please see: https://expressjs.com/en/api.html#routing-methods

Express Routing methods

Express supports the following routing methods corresponding to the HTTP methods of the same names:

checkout copy delete get head lock merge mkactivity mkcol move m-search notify options patch post purge put report search subscribe trace unlock unsubscribe

The API documentation has explicit entries only for the most popular HTTP methods app.get(), app.post(), app.put(), and app.delete(). However, the other methods listed above work in exactly the same way.

Upvotes: 1

Related Questions