Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-override

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-override

method override middleware for koa

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.4K
decreased by-51.85%
Maintainers
1
Weekly downloads
 
Created
Source

koa-override

NPM version build status Test coverage Gittip David deps npm download

Method override middleware. Let you use HTTP verbs such as PUT or DELETE in places where the client doesn't support it.

Refactor from koa-override-method#5

Install

$ npm install koa-override --save

Usage

var bodyParser = require('koa-body-parser')
var override = require('koa-override-method')

app.use(bodyParser())
app.use(override())

API

var mw = override()

If body exists, check body._method first. Otherwise check X-HTTP-Method-Override header.

If there is no override parameter, then it's simply this.request.method. You shouldn't use this unless you know you're using override.

License

MIT

Keywords

FAQs

Package last updated on 09 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc