GT2/GT2-iOS/node_modules/got/package.json

141 lines
13 KiB
JSON

{
"_args": [
[
{
"raw": "got@^6.7.1",
"scope": null,
"escapedName": "got",
"name": "got",
"rawSpec": "^6.7.1",
"spec": ">=6.7.1 <7.0.0",
"type": "range"
},
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/probe-image-size"
]
],
"_from": "got@>=6.7.1 <7.0.0",
"_id": "got@6.7.1",
"_inCache": true,
"_location": "/got",
"_nodeVersion": "6.9.2",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/got-6.7.1.tgz_1483022570319_0.12133173388428986"
},
"_npmUser": {
"name": "floatdrop",
"email": "floatdrop@gmail.com"
},
"_npmVersion": "3.10.9",
"_phantomChildren": {},
"_requested": {
"raw": "got@^6.7.1",
"scope": null,
"escapedName": "got",
"name": "got",
"rawSpec": "^6.7.1",
"spec": ">=6.7.1 <7.0.0",
"type": "range"
},
"_requiredBy": [
"/probe-image-size"
],
"_resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz",
"_shasum": "240cd05785a9a18e561dc1b44b41c763ef1e8db0",
"_shrinkwrap": null,
"_spec": "got@^6.7.1",
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/probe-image-size",
"ava": {
"concurrency": 4
},
"browser": {
"unzip-response": false
},
"bugs": {
"url": "https://github.com/sindresorhus/got/issues"
},
"dependencies": {
"create-error-class": "^3.0.0",
"duplexer3": "^0.1.4",
"get-stream": "^3.0.0",
"is-redirect": "^1.0.0",
"is-retry-allowed": "^1.0.0",
"is-stream": "^1.0.0",
"lowercase-keys": "^1.0.0",
"safe-buffer": "^5.0.1",
"timed-out": "^4.0.0",
"unzip-response": "^2.0.1",
"url-parse-lax": "^1.0.0"
},
"description": "Simplified HTTP requests",
"devDependencies": {
"ava": "^0.17.0",
"coveralls": "^2.11.4",
"form-data": "^2.1.1",
"get-port": "^2.0.0",
"into-stream": "^3.0.0",
"nyc": "^10.0.0",
"pem": "^1.4.4",
"pify": "^2.3.0",
"tempfile": "^1.1.1",
"xo": "*"
},
"directories": {},
"dist": {
"shasum": "240cd05785a9a18e561dc1b44b41c763ef1e8db0",
"tarball": "https://registry.npmjs.org/got/-/got-6.7.1.tgz"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js"
],
"gitHead": "52da6067ddac5250d6c2e76af9a150b9cf4ba025",
"homepage": "https://github.com/sindresorhus/got#readme",
"keywords": [
"http",
"https",
"get",
"got",
"url",
"uri",
"request",
"util",
"utility",
"simple",
"curl",
"wget",
"fetch"
],
"license": "MIT",
"maintainers": [
{
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
{
"name": "Vsevolod Strukchinsky",
"email": "floatdrop@gmail.com",
"url": "github.com/floatdrop"
}
],
"name": "got",
"optionalDependencies": {},
"readme": "<h1 align=\"center\">\n\t<br>\n\t<img width=\"360\" src=\"https://rawgit.com/sindresorhus/got/master/media/logo.svg\" alt=\"got\">\n\t<br>\n\t<br>\n\t<br>\n</h1>\n\n> Simplified HTTP requests\n\n[![Build Status](https://travis-ci.org/sindresorhus/got.svg?branch=master)](https://travis-ci.org/sindresorhus/got) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/got/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/got?branch=master) [![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got)\n\nA nicer interface to the built-in [`http`](http://nodejs.org/api/http.html) module.\n\nIt supports following redirects, promises, streams, retries, automagically handling gzip/deflate and some convenience options.\n\nCreated because [`request`](https://github.com/request/request) is bloated *(several megabytes!)*.\n\n\n## Install\n\n**WARNING: Node.js 4 or higher is required for got@6 and above.** For older Node.js versions use [got@5](https://github.com/sindresorhus/got/tree/v5.x).\n\n```\n$ npm install --save got\n```\n\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst got = require('got');\n\ngot('todomvc.com')\n\t.then(response => {\n\t\tconsole.log(response.body);\n\t\t//=> '<!doctype html> ...'\n\t})\n\t.catch(error => {\n\t\tconsole.log(error.response.body);\n\t\t//=> 'Internal server error ...'\n\t});\n\n// Streams\ngot.stream('todomvc.com').pipe(fs.createWriteStream('index.html'));\n\n// For POST, PUT and PATCH methods got.stream returns a WritableStream\nfs.createReadStream('index.html').pipe(got.stream.post('todomvc.com'));\n```\n\n\n### API\n\nIt's a `GET` request by default, but can be changed in `options`.\n\n#### got(url, [options])\n\nReturns a Promise for a `response` object with a `body` property, a `url` property with the request URL or the final URL after redirects, and a `requestUrl` property with the original request URL.\n\n##### url\n\nType: `string`, `object`\n\nThe URL to request or a [`http.request` options](https://nodejs.org/api/http.html#http_http_request_options_callback) object.\n\nProperties from `options` will override properties in the parsed `url`.\n\n##### options\n\nType: `object`\n\nAny of the [`http.request`](http://nodejs.org/api/http.html#http_http_request_options_callback) options.\n\n###### body\n\nType: `string`, `buffer`, `readableStream`, `object`\n\n*This is mutually exclusive with stream mode.*\n\nBody that will be sent with a `POST` request.\n\nIf present in `options` and `options.method` is not set, `options.method` will be set to `POST`.\n\nIf `content-length` or `transfer-encoding` is not set in `options.headers` and `body` is a string or buffer, `content-length` will be set to the body length.\n\nIf `body` is a plain object, it will be stringified with [`querystring.stringify`](https://nodejs.org/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) and sent as `application/x-www-form-urlencoded`.\n\n###### encoding\n\nType: `string`, `null`<br>\nDefault: `'utf8'`\n\nEncoding to be used on `setEncoding` of the response data. If `null`, the body is returned as a Buffer.\n\n###### json\n\nType: `boolean`<br>\nDefault: `false`\n\n*This is mutually exclusive with stream mode.*\n\nParse response body with `JSON.parse` and set `accept` header to `application/json`.\n\n###### query\n\nType: `string`, `object`<br>\n\nQuery string object that will be added to the request URL. This will override the query string in `url`.\n\n###### timeout\n\nType: `number`, `object`\n\nMilliseconds to wait for a server to send response headers before aborting request with `ETIMEDOUT` error.\n\nOption accepts `object` with separate `connect` and `socket` fields for connection and socket inactivity timeouts.\n\n###### retries\n\nType: `number`, `function`<br>\nDefault: `5`\n\nNumber of request retries when network errors happens. Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0).\n\nOption accepts `function` with `retry` and `error` arguments. Function must return delay in milliseconds (`0` return value cancels retry).\n\n**Note:** if `retries` is `number`, `ENOTFOUND` and `ENETUNREACH` error will not be retried (see full list in [`is-retry-allowed`](https://github.com/floatdrop/is-retry-allowed/blob/master/index.js#L12) module).\n\n###### followRedirect\n\nType: `boolean`<br>\nDefault: `true`\n\nDefines if redirect responses should be followed automatically.\n\n\n#### Streams\n\n#### got.stream(url, [options])\n\n`stream` method will return Duplex stream with additional events:\n\n##### .on('request', request)\n\n`request` event to get the request object of the request.\n\n**Tip**: You can use `request` event to abort request:\n\n```js\ngot.stream('github.com')\n\t.on('request', req => setTimeout(() => req.abort(), 50));\n```\n\n##### .on('response', response)\n\n`response` event to get the response object of the final request.\n\n##### .on('redirect', response, nextOptions)\n\n`redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location.\n\n##### .on('error', error, body, response)\n\n`error` event emitted in case of protocol error (like `ENOTFOUND` etc.) or status error (4xx or 5xx). The second argument is the body of the server response in case of status error. The third argument is response object.\n\n#### got.get(url, [options])\n#### got.post(url, [options])\n#### got.put(url, [options])\n#### got.patch(url, [options])\n#### got.head(url, [options])\n#### got.delete(url, [options])\n\nSets `options.method` to the method name and makes a request.\n\n\n## Errors\n\nEach error contains (if available) `statusCode`, `statusMessage`, `host`, `hostname`, `method` and `path` properties to make debugging easier.\n\nIn Promise mode, the `response` is attached to the error.\n\n#### got.RequestError\n\nWhen a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`.\n\n#### got.ReadError\n\nWhen reading from response stream fails.\n\n#### got.ParseError\n\nWhen `json` option is enabled and `JSON.parse` fails.\n\n#### got.HTTPError\n\nWhen server response code is not 2xx. Contains `statusCode` and `statusMessage`.\n\n#### got.MaxRedirectsError\n\nWhen server redirects you more than 10 times.\n\n\n## Proxies\n\nYou can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the `agent` option to work with proxies:\n\n```js\nconst got = require('got');\nconst tunnel = require('tunnel');\n\ngot('todomvc.com', {\n\tagent: tunnel.httpOverHttp({\n\t\tproxy: {\n\t\t\thost: 'localhost'\n\t\t}\n\t})\n});\n```\n\n\n## Cookies\n\nYou can use the [`cookie`](https://github.com/jshttp/cookie) module to include cookies in a request:\n\n```js\nconst got = require('got');\nconst cookie = require('cookie');\n\ngot('google.com', {\n\theaders: {\n\t\tcookie: cookie.serialize('foo', 'bar')\n\t}\n});\n```\n\n\n## Form data\n\nYou can use the [`form-data`](https://github.com/form-data/form-data) module to create POST request with form data:\n\n```js\nconst fs = require('fs');\nconst got = require('got');\nconst FormData = require('form-data');\nconst form = new FormData();\n\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n\ngot.post('google.com', {\n\tbody: form\n});\n```\n\n\n## OAuth\n\nYou can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create a signed OAuth request:\n\n```js\nconst got = require('got');\nconst crypto = require('crypto');\nconst OAuth = require('oauth-1.0a');\n\nconst oauth = OAuth({\n\tconsumer: {\n\t\tkey: process.env.CONSUMER_KEY,\n\t\tsecret: process.env.CONSUMER_SECRET\n\t},\n\tsignature_method: 'HMAC-SHA1',\n\thash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64')\n});\n\nconst token = {\n\tkey: process.env.ACCESS_TOKEN,\n\tsecret: process.env.ACCESS_TOKEN_SECRET\n};\n\nconst url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';\n\ngot(url, {\n\theaders: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)),\n\tjson: true\n});\n```\n\n\n## Unix Domain Sockets\n\nRequests can also be sent via [unix domain sockets](http://serverfault.com/questions/124517/whats-the-difference-between-unix-socket-and-tcp-ip-socket). Use the following URL scheme: `PROTOCOL://unix:SOCKET:PATH`.\n\n- `PROTOCOL` - `http` or `https` *(optional)*\n- `SOCKET` - absolute path to a unix domain socket, e.g. `/var/run/docker.sock`\n- `PATH` - request path, e.g. `/v2/keys`\n\n```js\ngot('http://unix:/var/run/docker.sock:/containers/json');\n\n// or without protocol (http by default)\ngot('unix:/var/run/docker.sock:/containers/json');\n```\n\n\n## Tip\n\nIt's a good idea to set the `'user-agent'` header so the provider can more easily see how their resource is used. By default, it's the URL to this repo.\n\n```js\nconst got = require('got');\nconst pkg = require('./package.json');\n\ngot('todomvc.com', {\n\theaders: {\n\t\t'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)`\n\t}\n});\n```\n\n\n## Related\n\n- [gh-got](https://github.com/sindresorhus/gh-got) - Convenience wrapper for interacting with the GitHub API\n- [travis-got](https://github.com/samverschueren/travis-got) - Convenience wrapper for interacting with the Travis API\n\n\n## Created by\n\n[![Sindre Sorhus](https://avatars.githubusercontent.com/u/170270?v=3&s=100)](https://sindresorhus.com) | [![Vsevolod Strukchinsky](https://avatars.githubusercontent.com/u/365089?v=3&s=100)](https://github.com/floatdrop)\n---|---\n[Sindre Sorhus](https://sindresorhus.com) | [Vsevolod Strukchinsky](https://github.com/floatdrop)\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
"readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/got.git"
},
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "xo && nyc ava"
},
"version": "6.7.1",
"xo": {
"esnext": true
}
}