118 lines
11 KiB
JSON
118 lines
11 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "reqwest@2.0.5",
|
||
|
"scope": null,
|
||
|
"escapedName": "reqwest",
|
||
|
"name": "reqwest",
|
||
|
"rawSpec": "2.0.5",
|
||
|
"spec": "2.0.5",
|
||
|
"type": "version"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/auth0-js"
|
||
|
]
|
||
|
],
|
||
|
"_from": "reqwest@2.0.5",
|
||
|
"_id": "reqwest@2.0.5",
|
||
|
"_inCache": true,
|
||
|
"_location": "/reqwest",
|
||
|
"_nodeVersion": "0.12.4",
|
||
|
"_npmUser": {
|
||
|
"name": "ded",
|
||
|
"email": "polvero@gmail.com"
|
||
|
},
|
||
|
"_npmVersion": "2.13.2",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "reqwest@2.0.5",
|
||
|
"scope": null,
|
||
|
"escapedName": "reqwest",
|
||
|
"name": "reqwest",
|
||
|
"rawSpec": "2.0.5",
|
||
|
"spec": "2.0.5",
|
||
|
"type": "version"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/auth0-js"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/reqwest/-/reqwest-2.0.5.tgz",
|
||
|
"_shasum": "00fb15ac4918c419ca82b43f24c78882e66039a1",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "reqwest@2.0.5",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/auth0-js",
|
||
|
"author": {
|
||
|
"name": "Dustin Diaz",
|
||
|
"email": "dustin@dustindiaz.com",
|
||
|
"url": "http://dustindiaz.com"
|
||
|
},
|
||
|
"browser": {
|
||
|
"xhr2": false
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/ded/reqwest/issues"
|
||
|
},
|
||
|
"dependencies": {},
|
||
|
"description": "A wrapper for asynchronous http requests",
|
||
|
"devDependencies": {
|
||
|
"bump": "0.2.3",
|
||
|
"connect": "1.8.x",
|
||
|
"delayed-stream": "0.0.5",
|
||
|
"dispatch": "0.x.x",
|
||
|
"mime": "1.x.x",
|
||
|
"sink-test": ">=0.1.2",
|
||
|
"smoosh": "0.4.0",
|
||
|
"valentine": ">=1.4.7"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "00fb15ac4918c419ca82b43f24c78882e66039a1",
|
||
|
"tarball": "https://registry.npmjs.org/reqwest/-/reqwest-2.0.5.tgz"
|
||
|
},
|
||
|
"ender": "./src/ender.js",
|
||
|
"gitHead": "d9be8c54a65bc54a8fa5ca8e9a719c51abf44996",
|
||
|
"homepage": "https://github.com/ded/reqwest",
|
||
|
"keywords": [
|
||
|
"ender",
|
||
|
"ajax",
|
||
|
"xhr",
|
||
|
"connection",
|
||
|
"web 2.0",
|
||
|
"async",
|
||
|
"sync"
|
||
|
],
|
||
|
"license": "MIT",
|
||
|
"main": "./reqwest.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "ded",
|
||
|
"email": "polvero@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "rvagg",
|
||
|
"email": "rod@vagg.org"
|
||
|
}
|
||
|
],
|
||
|
"name": "reqwest",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# It's AJAX\n\nAll over again. Includes support for xmlHttpRequest, JSONP, CORS, and CommonJS Promises A.\n\nIt is also isomorphic allowing you to `require('reqwest')` in `Node.js` through the peer dependency [xhr2](https://github.com/pwnall/node-xhr2), albeit the original intent of this library is for the browser. For a more thorough solution for Node.js, see [mikeal/request](https://github.com/request/request).\n\n## API\n\n``` js\nreqwest('path/to/html', function (resp) {\n qwery('#content').html(resp)\n})\n\nreqwest({\n url: 'path/to/html'\n , method: 'post'\n , data: { foo: 'bar', baz: 100 }\n , success: function (resp) {\n qwery('#content').html(resp)\n }\n})\n\nreqwest({\n url: 'path/to/html'\n , method: 'get'\n , data: [ { name: 'foo', value: 'bar' }, { name: 'baz', value: 100 } ]\n , success: function (resp) {\n qwery('#content').html(resp)\n }\n})\n\nreqwest({\n url: 'path/to/json'\n , type: 'json'\n , method: 'post'\n , error: function (err) { }\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n})\n\nreqwest({\n url: 'path/to/json'\n , type: 'json'\n , method: 'post'\n , contentType: 'application/json'\n , headers: {\n 'X-My-Custom-Header': 'SomethingImportant'\n }\n , error: function (err) { }\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n})\n\n// Uses XMLHttpRequest2 credentialled requests (cookies, HTTP basic auth) if supported\nreqwest({\n url: 'path/to/json'\n , type: 'json'\n , method: 'post'\n , contentType: 'application/json'\n , crossOrigin: true\n , withCredentials: true\n , error: function (err) { }\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n})\n\nreqwest({\n url: 'path/to/data.jsonp?callback=?'\n , type: 'jsonp'\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n})\n\nreqwest({\n url: 'path/to/data.jsonp?foo=bar'\n , type: 'jsonp'\n , jsonpCallback: 'foo'\n , jsonpCallbackName: 'bar'\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n})\n\nreqwest({\n url: 'path/to/data.jsonp?foo=bar'\n , type: 'jsonp'\n , jsonpCallback: 'foo'\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n , complete: function (resp) {\n qwery('#hide-this').hide()\n }\n})\n```\n\n## Promises\n\n``` js\nreqwest({\n url: 'path/to/data.jsonp?foo=bar'\n , type: 'jsonp'\n , jsonpCallback: 'foo'\n})\n .then(function (resp) {\n qwery('#content').html(resp.content)\n }, function (err, msg) {\n qwery('#errors').html(msg)\n })\n .always(function (resp) {\n qwery('#hide-this').hide()\n })\n```\n\n``` js\nreqwest({\n url: 'path/to/data.jsonp?foo=bar'\n , type: 'jsonp'\n , jsonpCallback: 'foo'\n})\n .then(function (resp) {\n qwery('#content').html(resp.content)\n })\n .fail(function (err, msg) {\n qwery('#errors').html(msg)\n })\n .always(function (resp) {\n qwery('#hide-this').hide()\n })\n```\n\n``` js\nvar r = reqwest({\n url: 'path/to/data.jsonp?foo=bar'\n , type: 'jsonp'\n , jsonpCallback: 'foo'\n , success: function () {\n setTimeout(function () {\n r\n .then(function (resp) {\n qwery('#content').html(resp.content)\n }, function (err) { })\n .always(function (resp) {\n qwery('#hide-this').hide()\n })\n }, 15)\n }\n})\n```\n\n## Options\n\n * `url` a fully qualified uri\n * `method` http method (default: `GET`)\n * `headers` http headers (default: `{}`)\n * `data` entity body for `PATCH`, `POST` and `PUT` requests. Must be a query `String` or `JSON` object\n * `type` a string enum. `html`, `xml`, `json`, or `jsonp`. Default is inferred by resource extension. Eg: `.json` will set `type` to `json`. `.xml` to `xml` etc.\n * `contentType` sets the `Content-Type` of the request. Eg: `application/json`\n * `crossOrigin` for cross-origin requests for browsers that support this feature.\n * `success` A functi
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/ded/reqwest.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"boosh": "smoosh make ./build.json",
|
||
|
"test": "node ./test.js"
|
||
|
},
|
||
|
"spm": {
|
||
|
"main": "reqwest.js",
|
||
|
"ignore": [
|
||
|
"vendor",
|
||
|
"test",
|
||
|
"make"
|
||
|
]
|
||
|
},
|
||
|
"version": "2.0.5"
|
||
|
}
|