forked from maksrom/javascript-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
46 lines (46 loc) · 2.11 KB
/
package.json
File metadata and controls
46 lines (46 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"name": "koa-request",
"description": "wrapper to request library ready to use in koa",
"main": "./",
"author": {
"name": "Dion Olsthoorn",
"email": "dion.olsthoorn@gmail.com"
},
"version": "1.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/dionoid/koa-request.git"
},
"bugs": {
"url": "https://github.com/dionoid/koa-request/issues"
},
"dependencies": {
"request": "*"
},
"homepage": "https://github.com/dionoid/koa-request",
"directories": {
"example": "examples"
},
"license": "MIT",
"readme": "koa-request\n===========\n\nVery simple wrapper to the request library for use in koa. \nWraps the request lib as thunk-returning functions for use in kao's middleware generator-functions.\n\n\nTo install simply run:\n```bash\nnpm install koa-request\n```\n\nRequire koa first and will only work on node v0.11.7 or newer.\n\nYou must run node with --harmony flag (--harmony-generators works as well)\n\n```bash\nnode --harmony example.js\n```\n\nSimple example using koa-request in koa:\n\n```js\nvar koa = require('koa');\nvar request = require('koa-request');\n \nvar app = koa();\n\napp.use(function *() {\n\n\tvar options = {\n \turl: 'https://api.github.com/repos/dionoid/koa-request',\n\t headers: { 'User-Agent': 'request' }\n\t};\n\n\tvar response = yield request(options); //Yay, HTTP requests with no callbacks!\n\tvar info = JSON.parse(response.body);\n\n\tthis.body = 'my full name is ' + info.full_name;\n});\n\napp.listen(process.env.PORT || 8080);\n```",
"readmeFilename": "README.md",
"_id": "koa-request@1.0.0",
"dist": {
"shasum": "19343352479d2cb965d7aff0a802b1a06d408e16",
"tarball": "http://registry.npmjs.org/koa-request/-/koa-request-1.0.0.tgz"
},
"_from": "koa-request@*",
"_npmVersion": "1.3.22",
"_npmUser": {
"name": "dionoid",
"email": "dion.olsthoorn@gmail.com"
},
"maintainers": [
{
"name": "dionoid",
"email": "dion.olsthoorn@gmail.com"
}
],
"_shasum": "19343352479d2cb965d7aff0a802b1a06d408e16",
"_resolved": "https://registry.npmjs.org/koa-request/-/koa-request-1.0.0.tgz"
}