GT2/GT2-iOS/node_modules/method-override/package.json

139 lines
10 KiB
JSON

{
"_args": [
[
{
"raw": "method-override@~2.3.5",
"scope": null,
"escapedName": "method-override",
"name": "method-override",
"rawSpec": "~2.3.5",
"spec": ">=2.3.5 <2.4.0",
"type": "range"
},
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/connect"
]
],
"_from": "method-override@>=2.3.5 <2.4.0",
"_id": "method-override@2.3.10",
"_inCache": true,
"_location": "/method-override",
"_nodeVersion": "6.11.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/method-override-2.3.10.tgz_1506520336693_0.05104158725589514"
},
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "method-override@~2.3.5",
"scope": null,
"escapedName": "method-override",
"name": "method-override",
"rawSpec": "~2.3.5",
"spec": ">=2.3.5 <2.4.0",
"type": "range"
},
"_requiredBy": [
"/connect"
],
"_resolved": "https://registry.npmjs.org/method-override/-/method-override-2.3.10.tgz",
"_shasum": "e3daf8d5dee10dd2dce7d4ae88d62bbee77476b4",
"_shrinkwrap": null,
"_spec": "method-override@~2.3.5",
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/connect",
"bugs": {
"url": "https://github.com/expressjs/method-override/issues"
},
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
],
"dependencies": {
"debug": "2.6.9",
"methods": "~1.1.2",
"parseurl": "~1.3.2",
"vary": "~1.1.2"
},
"description": "Override HTTP verbs",
"devDependencies": {
"eslint": "3.19.0",
"eslint-config-standard": "10.2.1",
"eslint-plugin-import": "2.2.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "4.2.2",
"eslint-plugin-promise": "3.5.0",
"eslint-plugin-standard": "3.0.1",
"istanbul": "0.4.5",
"mocha": "2.5.3",
"supertest": "1.1.0"
},
"directories": {},
"dist": {
"shasum": "e3daf8d5dee10dd2dce7d4ae88d62bbee77476b4",
"tarball": "https://registry.npmjs.org/method-override/-/method-override-2.3.10.tgz"
},
"engines": {
"node": ">= 0.8.0"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"gitHead": "ddfc7ccd42c468bfef54b7698d1c4acb85cce758",
"homepage": "https://github.com/expressjs/method-override#readme",
"license": "MIT",
"maintainers": [
{
"name": "defunctzombie",
"email": "shtylman@gmail.com"
},
{
"name": "jongleberry",
"email": "jonathanrichardong@gmail.com"
},
{
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
{
"name": "tjholowaychuk",
"email": "tj@vision-media.ca"
},
{
"name": "mscdex",
"email": "mscdex@mscdex.net"
},
{
"name": "fishrock123",
"email": "fishrock123@rocketmail.com"
}
],
"name": "method-override",
"optionalDependencies": {},
"readme": "# method-override\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n[![Gratipay][gratipay-image]][gratipay-url]\n\nLets you use HTTP verbs such as PUT or DELETE in places where the client doesn't support it.\n\n## Install\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```sh\n$ npm install method-override\n```\n\n## API\n\n**NOTE** It is very important that this module is used **before** any module that\nneeds to know the method of the request (for example, it _must_ be used prior to\nthe `csurf` module).\n\n### methodOverride(getter, options)\n\nCreate a new middleware function to override the `req.method` property with a new\nvalue. This value will be pulled from the provided `getter`.\n\n- `getter` - The getter to use to look up the overridden request method for the request. (default: `X-HTTP-Method-Override`)\n- `options.methods` - The allowed methods the original request must be in to check for a method override value. (default: `['POST']`)\n\nIf the found method is supported by node.js core, then `req.method` will be set to\nthis value, as if it has originally been that value. The previous `req.method`\nvalue will be stored in `req.originalMethod`.\n\n#### getter\n\nThis is the method of getting the override value from the request. If a function is provided,\nthe `req` is passed as the first argument, the `res` as the second argument and the method is\nexpected to be returned. If a string is provided, the string is used to look up the method\nwith the following rules:\n\n- If the string starts with `X-`, then it is treated as the name of a header and that header\n is used for the method override. If the request contains the same header multiple times, the\n first occurrence is used.\n- All other strings are treated as a key in the URL query string.\n\n#### options.methods\n\nThis allows the specification of what methods(s) the request *MUST* be in in order to check for\nthe method override value. This defaults to only `POST` methods, which is the only method the\noverride should arrive in. More methods may be specified here, but it may introduce security\nissues and cause weird behavior when requests travel through caches. This value is an array\nof methods in upper-case. `null` can be specified to allow all methods.\n\n## Examples\n\n### override using a header\n\nTo use a header to override the method, specify the header name\nas a string argument to the `methodOverride` function. To then make\nthe call, send a `POST` request to a URL with the overridden method\nas the value of that header. This method of using a header would\ntypically be used in conjunction with `XMLHttpRequest` on implementations\nthat do not support the method you are trying to use.\n\n```js\nvar express = require('express')\nvar methodOverride = require('method-override')\nvar app = express()\n\n// override with the X-HTTP-Method-Override header in the request\napp.use(methodOverride('X-HTTP-Method-Override'))\n```\n\nExample call with header override using `XMLHttpRequest`:\n\n<!-- eslint-env browser -->\n\n```js\nvar xhr = new XMLHttpRequest()\nxhr.onload = onload\nxhr.open('post', '/resource', true)\nxhr.setRequestHeader('X-HTTP-Method-Override', 'DELETE')\nxhr.send()\n\nfunction onload () {\n alert('got response: ' + this.responseText)\n}\n```\n\n### override using a query value\n\nTo use a query string value to override the method, specify the query\nstring key as a string argument to the `methodOverride` function. To\nthen make the call, send a `POST` request to a URL with the overridden\nmethod as the value of that query string key. This method of using a\nquery value would typically be used in conjunction with plain HTML\n`<form>` elements when trying to support legacy browsers but still use\nnewer methods.\n\n```js\nvar express = require('express')\nvar methodOverride = require('method-override')\nvar app = express()\n\n// override with POST having ?_method=DELETE\napp.use(methodOverride('_method'))\n```\n\nExample call with query override using HTML `<form>`:\n\n```html\n<form method=\"POST\" action=\"/resource?_method=DELETE\">\n <button type=\"submit\">Delete resource</button>\n</form>\n```\n\n### multiple format support\n\n```js\nvar express = require('express')\nvar methodOverride = require('method-override')\nvar app = express()\n\n// override with different headers; last one takes precedence\napp.use(methodOverride('X-HTTP-Method')) // Microsoft\napp.use(methodOverride('X-HTTP-Method-Override')) // Google/GData\napp.use(methodOverride('X-Method-Override')) // IBM\n```\n\n### custom logic\n\nYou can implement any kind of custom logic with a function for the `getter`. The following\nimplements the logic for looking in `req.body` that was in `method-override@1`:\n\n```js\nvar bodyParser = require('body-parser')\nvar express = require('express')\nvar methodOverride = require('method-override')\nvar app = express()\n\n// NOTE: when using req.body, you must fully parse the request body\n// before you call methodOverride() in your middleware stack,\n// otherwise req.body will not be populated.\napp.use(bodyParser.urlencoded())\napp.use(methodOverride(function (req, res) {\n if (req.body && typeof req.body === 'object' && '_method' in req.body) {\n // look in urlencoded POST bodies and delete it\n var method = req.body._method\n delete req.body._method\n return method\n }\n}))\n```\n\nExample call with query override using HTML `<form>`:\n\n```html\n<!-- enctype must be set to the type you will parse before methodOverride() -->\n<form method=\"POST\" action=\"/resource\" enctype=\"application/x-www-form-urlencoded\">\n <input type=\"hidden\" name=\"_method\" value=\"DELETE\">\n <button type=\"submit\">Delete resource</button>\n</form>\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/method-override.svg\n[npm-url]: https://npmjs.org/package/method-override\n[travis-image]: https://img.shields.io/travis/expressjs/method-override/master.svg\n[travis-url]: https://travis-ci.org/expressjs/method-override\n[coveralls-image]: https://img.shields.io/coveralls/expressjs/method-override/master.svg\n[coveralls-url]: https://coveralls.io/r/expressjs/method-override?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/method-override.svg\n[downloads-url]: https://npmjs.org/package/method-override\n[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg\n[gratipay-url]: https://www.gratipay.com/dougwilson/\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/expressjs/method-override.git"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --check-leaks --reporter spec --bail test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/"
},
"version": "2.3.10"
}