{"repo":"expressjs/method-override","free":true,"listed":false,"github":"https://github.com/expressjs/method-override","clone":"git clone https://github.com/expressjs/method-override.git","description":"Override HTTP verbs.","language":"JavaScript","stars":627,"topics":["javascript","nodejs","expressjs","middleware","method-override"],"license":"MIT","category":"dev-tools","readme_excerpt":"method-override [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Build Status][travis-image]][travis-url] [![Test Coverage][coveralls-image]][coveralls-url] Lets you use HTTP verbs such as PUT or DELETE in places where the client doesn't support it. Install This is a Node.js module available through the npm registry. Installation is done using the npm install command: API NOTE It is very important that this module is used before any module that needs to know the method of the request (for example, it must be used prior to the csurf module). methodOverride(getter, options) Create a new middleware function to override the req.method property with a new value. This value will be pulled from the provided getter . - getter - The getter to use to look up the overridden request method for the request. (default: X-HTTP-Method-Override ) - options.methods - The allowed methods the original request must be in to check for a method override value. (default: ['POST'] ) If the found method is supported by node.js core, then req.method will be set to this value, as if it has originally been that value. The previous req.method value will be stored in req.originalMethod . getter This is the method of getting the override value from the request. If a function is provided, the req is passed as the first argument, the res as the second argument and the method is expected to be returned. If a string is provided, the string is used to look up the method w","default_branch":null,"files":null,"tree":[],"storefront":"/r/expressjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/expressjs/method-override/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}