GT2/GT2-iOS/node_modules/reqwest/package.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"
},
"/Volumes/2009-SSD/GT2/GT2-iOS/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": "/Volumes/2009-SSD/GT2/GT2-iOS/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 function called when the request successfully completes\n * `error` A function called when the request fails.\n * `complete` A function called whether the request is a success or failure. Always called when complete.\n * `jsonpCallback` Specify the callback function name for a `JSONP` request. This value will be used instead of the random (but recommended) name automatically generated by reqwest.\n\n## Security\n\nIf you are *still* requiring support for IE6/IE7, consider including [JSON3](https://bestiejs.github.io/json3/) in your project. Or simply do the following\n\n``` html\n<script>\n(function () {\n if (!window.JSON) {\n document.write('<scr' + 'ipt src=\"http://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js\"><\\/scr' + 'ipt>')\n }\n}());\n</script>\n```\n\n\n## Contributing\n\n``` sh\n$ git clone git://github.com/ded/reqwest.git reqwest\n$ cd !$\n$ npm install\n```\n\nPlease keep your local edits to `src/reqwest.js`.\nThe base `./reqwest.js` and `./reqwest.min.js` will be built upon releases.\n\n## Running Tests\n\n``` sh\nmake test\n```\n\n## Browser support\n\n * IE6+\n * Chrome 1+\n * Safari 3+\n * Firefox 1+\n * Opera\n\n## Ender Support\nReqwest can be used as an [Ender](http://enderjs.com) module. Add it to your existing build as such:\n\n $ ender add reqwest\n\nUse it as such:\n\n``` js\n$.ajax({ ... })\n```\n\nSerialize things:\n\n``` js\n$(form).serialize() // returns query string -> x=y&...\n$(form).serialize({type:'array'}) // returns array name/value pairs -> [ { name: x, value: y}, ... ]\n$(form).serialize({type:'map'}) // returns an object representation -> { x: y, ... }\n$(form).serializeArray()\n$.toQueryString({\n foo: 'bar'\n , baz: 'thunk'\n}) // returns query string -> foo=bar&baz=thunk\n```\n\nOr, get a bit fancy:\n\n``` js\n$('#myform input[name=myradios]').serialize({type:'map'})['myradios'] // get the selected value\n$('input[type=text],#specialthing').serialize() // turn any arbitrary set of form elements into a query string\n```\n\n## ajaxSetup\nUse the `request.ajaxSetup` to predefine a data filter on all requests. See the example below that demonstrates JSON hijacking prevention:\n\n``` js\n$.ajaxSetup({\n dataFilter: function (response, type) {\n if (type == 'json') return response.substring('])}while(1);</x>'.length)\n else return response\n }\n})\n```\n\n## RequireJs and Jam\nReqwest can also be used with RequireJs and can be installed via jam\n\n```\njam install reqwest\n```\n\n```js\ndefine(function(require){\n var reqwest = require('reqwest')\n});\n```\n\n## spm\nReqwest can also be installed via spm [![](http://spmjs.io/badge/reqwest)](http://spmjs.io/package/reqwest)\n\n```\nspm install reqwest\n```\n\n## jQuery and Zepto Compatibility\nThere are some differences between the *Reqwest way* and the\n*jQuery/Zepto way*.\n\n### method ###\njQuery/Zepto use `type` to specify the request method while Reqwest uses\n`method` and reserves `type` for the response data type.\n\n### dataType ###\nWhen using jQuery/Zepto you use the `dataType` option to specify the type\nof data to expect from the server, Reqwest uses `type`. jQuery also can\nalso take a space-separated list of data types to specify the request,\nresponse and response-conversion types but Reqwest uses the `type`\nparameter to infer the response type and leaves conversion up to you.\n\n### JSONP ###\nReqwest also takes optional `jsonpCallback` and `jsonpCallbackName`\noptions to specify the callback query-string key and the callback function\nname respectively while jQuery uses `jsonp` and `jsonpCallback` for\nthese same options.\n\n\nBut fear not! If you must work the jQuery/Zepto way then Reqwest has\na wrapper that will remap these options for you:\n\n```js\nreqwest.compat({\n url: 'path/to/data.jsonp?foo=bar'\n , dataType: 'jsonp'\n , jsonp: 'foo'\n , jsonpCallback: 'bar'\n , success: function (resp) {\n qwery('#content').html(resp.content)\n }\n})\n\n// or from Ender:\n\n$.ajax.compat({\n ...\n})\n```\n\nIf you want to install jQuery/Zepto compatibility mode as the default\nthen simply place this snippet at the top of your code:\n\n```js\n$.ajax.compat && $.ender({ ajax: $.ajax.compat });\n```\n\n\n**Happy Ajaxing!**\n",
"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"
}