In Express.js, req.method is a string with the HTTP method of the current request — GET, POST, PUT, DELETE, and so on.
Read it in middleware or shared handlers (for example with app.all()) to log, audit, or branch. Prefer dedicated routes like app.get() / app.post() for most endpoints; use req.method when one stack must react to the verb.
Syntax
Read req.method in your Express.js route handler. Start with this line.
Express
req.method
Call
What it does
req.method
Primary signature.
Install with npm install express. Create the app with const app = express() before you use this API in an Express.js tutorial project.
PUT /items
→ 405 Method Not Allowed
Allow: GET, POST
GET /items
→ GET /items OK
How It Works
Keep an allow-list. Only listed verbs continue.
Check req.method. Unknown verbs fail the Set test.
Set Allow. Clients learn which methods are valid.
Send 405. Correct status for “path exists, verb does not.”
Compatibility
Runtime Support
req.method is an Express.js request property (backed by Node’s HTTP request). It runs on a Node.js server (Express 5 needs Node.js 18+). Browsers do not execute it — they only send the HTTP method to your app.
✓ Server · Express 4 & 5
req.method
Works wherever Express runs: Node.js is the primary target. Bun and Deno can run many Express apps with compatibility layers. Not available in the browser.
ServerNode.js runtime API
Node.js18+ for Express 5 · 14+ typical for Express 4
Supported
BunExpress-compatible server apps
Supported
DenoVia npm compatibility / adapters
Supported
req.methodExpress on Node.js
Bottom line: Study and run these examples with Node.js and the express package. Copy a snippet into a local file and start the server with node.
Frequently Asked Questions
It is a string with the HTTP method of the current request, such as GET, POST, PUT, PATCH, or DELETE.
Yes in normal Node.js/Express handling. Compare with uppercase literals like 'GET' and 'POST'.
Use it in shared middleware for logging, audits, or branching when one handler covers several verbs (for example with app.all).
app.get() registers a route that only runs for GET. req.method tells you which verb the incoming request actually used.
No. It is a server-side request property. Browsers send the HTTP method; Express exposes it as req.method on the server.