expressjs / expressjs/express

Issue a warning when GET route declared before HEAD

Open
#5,004 2 comments 0 reactions 0 assignees View on GitHub
discuss enhancement
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

I have spent several hours debugging a HEAD route and eventually found that I had fallen foul of the note here:
https://expressjs.com/en/4x/api.html#router.METHOD

A warning may not be the right approach, but it would be nice to be notified on a HEAD route declared after a GET that the GET logic would be called. I suspect I will be neither the first nor the last to have bashed their head against a wall over this one!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.