You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
44 KiB

{
"_args": [
[
"request@2",
"/Users/rebecca/code/npm/node_modules/node-gyp"
]
],
"_from": "request@>=2.0.0 <3.0.0",
"_id": "request@2.64.0",
"_inCache": true,
"_location": "/request",
"_nodeVersion": "4.1.0",
"_npmUser": {
"email": "simeonvelichkov@gmail.com",
"name": "simov"
},
"_npmVersion": "2.14.3",
"_phantomChildren": {},
"_requested": {
"name": "request",
"raw": "request@2",
"rawSpec": "2",
"scope": null,
"spec": ">=2.0.0 <3.0.0",
"type": "range"
},
"_requiredBy": [
"/node-gyp",
"/npm-registry-client"
],
"_resolved": "https://registry.npmjs.org/request/-/request-2.64.0.tgz",
"_shasum": "96a582423ce9b4b5c34e9b232e480173f14ba608",
"_shrinkwrap": null,
"_spec": "request@2",
"_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
"author": {
"email": "mikeal.rogers@gmail.com",
"name": "Mikeal Rogers"
},
"bugs": {
"url": "http://github.com/request/request/issues"
},
"dependencies": {
"aws-sign2": "~0.5.0",
"bl": "~1.0.0",
"caseless": "~0.11.0",
"combined-stream": "~1.0.1",
"extend": "~3.0.0",
"forever-agent": "~0.6.0",
"form-data": "~1.0.0-rc1",
"har-validator": "^1.6.1",
"hawk": "~3.1.0",
"http-signature": "~0.11.0",
"isstream": "~0.1.1",
"json-stringify-safe": "~5.0.0",
"mime-types": "~2.1.2",
"node-uuid": "~1.4.0",
"oauth-sign": "~0.8.0",
"qs": "~5.1.0",
"stringstream": "~0.0.4",
"tough-cookie": ">=0.12.0",
"tunnel-agent": "~0.4.0"
},
"description": "Simplified HTTP request client.",
"devDependencies": {
"bluebird": "~2.9.21",
"browserify": "~5.9.1",
"browserify-istanbul": "~0.1.3",
"buffer-equal": "0.0.1",
"codecov.io": "~0.1.2",
"coveralls": "~2.11.2",
"eslint": "0.18.0",
"function-bind": "~1.0.0",
"istanbul": "~0.3.2",
"karma": "~0.12.21",
"karma-browserify": "~3.0.1",
"karma-cli": "0.0.4",
"karma-coverage": "0.2.6",
"karma-phantomjs-launcher": "~0.1.4",
"karma-tap": "~1.0.1",
"rimraf": "~2.2.8",
"server-destroy": "~1.0.0",
"tape": "~3.0.0",
"taper": "~0.4.0"
},
"directories": {},
"dist": {
"shasum": "96a582423ce9b4b5c34e9b232e480173f14ba608",
"tarball": "http://registry.npmjs.org/request/-/request-2.64.0.tgz"
},
"engines": {
"node": ">=0.8.0"
},
"gitHead": "ca364485249f13c4810bb9b3952fb0fb886a93ee",
"homepage": "https://github.com/request/request#readme",
"installable": true,
"license": "Apache-2.0",
"main": "index.js",
"maintainers": [
{
"name": "mikeal",
"email": "mikeal.rogers@gmail.com"
},
{
"name": "nylen",
"email": "jnylen@gmail.com"
},
{
"name": "fredkschott",
"email": "fkschott@gmail.com"
},
{
"name": "simov",
"email": "simeonvelichkov@gmail.com"
}
],
"name": "request",
"optionalDependencies": {},
"readme": "\n# Request - Simplified HTTP client\n\n[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)\n\n[![Build status](https://img.shields.io/travis/request/request.svg?style=flat-square)](https://travis-ci.org/request/request)\n[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master)\n[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request)\n[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request)\n[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge)\n\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```js\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Show the HTML for the Google homepage.\n }\n})\n```\n\n\n## Table of contents\n\n- [Streaming](#streaming)\n- [Forms](#forms)\n- [HTTP Authentication](#http-authentication)\n- [Custom HTTP Headers](#custom-http-headers)\n- [OAuth Signing](#oauth-signing)\n- [Proxies](#proxies)\n- [Unix Domain Sockets](#unix-domain-sockets)\n- [TLS/SSL Protocol](#tlsssl-protocol)\n- [Support for HAR 1.2](#support-for-har-12)\n- [**All Available Options**](#requestoptions-callback)\n\nRequest also offers [convenience methods](#convenience-methods) like\n`request.defaults` and `request.post`, and there are\nlots of [usage examples](#examples) and several\n[debugging techniques](#debugging).\n\n\n---\n\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```js\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```js\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```js\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nRequest emits a \"response\" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage).\n\n```js\nrequest\n .get('http://google.com/img.png')\n .on('response', function(response) {\n console.log(response.statusCode) // 200\n console.log(response.headers['content-type']) // 'image/png'\n })\n .pipe(request.put('http://mysite.com/img.png'))\n```\n\nTo easily handle errors when streaming requests, listen to the `error` event before piping:\n\n```js\nrequest\n .get('http://mysite.com/doodle.png')\n .on('error', function(err) {\n console.log(err)\n })\n .pipe(fs.createWriteStream('doodle.png'))\n```\n\nNow lets get fancy.\n\n```js\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```js\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('h
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/request/request.git"
},
"scripts": {
"lint": "eslint lib/ *.js tests/ && echo Lint passed.",
"test": "npm run lint && npm run test-ci && npm run test-browser",
"test-browser": "node tests/browser/start.js",
"test-ci": "taper tests/test-*.js",
"test-cov": "istanbul cover tape tests/test-*.js"
},
"tags": [
"http",
"simple",
"util",
"utility"
],
"version": "2.64.0"
}