req.method

The request method (aka “verb”.)

Usage

  1. req.method;

Example

If a client sends a POST request to /product:

  1. req.method;
  2. // -> "POST"

Notes

  • All requests to a Sails server have a “method”, even via WebSockets (this is thanks to the request interpreter)