{"_id":"quip","_rev":"30-8e373f6893fc22d9ade82794f3bff9e9","name":"quip","description":"A chainable API for response objects in node","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"quip","description":"A chainable API for response objects in node","main":"./index","author":{"name":"Caolan McMahon"},"version":"0.0.1","repository":{"type":"git","url":"http://github.com/caolan/quip.git"},"bugs":{"web":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"_id":"quip@0.0.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"https://registry.npmjs.org/quip/-/quip-0.0.1.tgz","shasum":"9737ef70b9ac2b22d5b139afb817fa4e055bad42","integrity":"sha512-tz8uluF4fim8YRoqddE+bt71kP7OVtwjXsJcuTzUJf0ykBPIWxr4bb6tkQQpEnuE0sPYkB94v7dc1eVsVHQdFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiPM+1ehzMsmR9Ky2xtBbMfZlG0JCqz0vrwnBNSnGpeAIgJItV4vVUdxfWdAH9N1KQKu0VJebPCrjlyXrQlaqpeMc="}]},"directories":{}},"0.0.2":{"name":"quip","description":"A chainable API for response objects in node","main":"./index","author":{"name":"Caolan McMahon"},"version":"0.0.2","repository":{"type":"git","url":"http://github.com/caolan/quip.git"},"bugs":{"web":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"_id":"quip@0.0.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.4-1","_nodeVersion":"v0.4.2","dist":{"tarball":"https://registry.npmjs.org/quip/-/quip-0.0.2.tgz","shasum":"5a041aedfbeb34d14ea991c3401afcbf2ebc86b7","integrity":"sha512-Pw5uK0AJ1z5saEIjM7yfWO8ggBWcB3OLYZ3BOwP+5nmbMyfel9Kh/n6qKPNqoGoTsuX9wZG2fBiolYsjNZTzEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWlxKj43cz7r76x0bxOivQXeSQMIu0acenH/OYyI75lQIhAIjDCqC91gAvG8YukVO9ImX0sRphc8EjM8Il0cPZY/7V"}]},"directories":{}},"0.0.3":{"name":"quip","description":"A chainable API for response objects in node","main":"./index","author":{"name":"Caolan McMahon"},"version":"0.0.3","repository":{"type":"git","url":"git://github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"_npmUser":{"name":"caolan","email":"caolan@caolanmcmahon.com"},"_id":"quip@0.0.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.10","_defaultsLoaded":true,"dist":{"shasum":"242f7bd10a768e1d1d1a4045c7e992efba87ca10","tarball":"https://registry.npmjs.org/quip/-/quip-0.0.3.tgz","integrity":"sha512-zYsjk/mAq0gNM6fkBPmaw+/o/3iTRNe1gSQc6alo8atvrdmaIusirZ6a58Z72LJdHOHYuVJ/+50ODusVSJdveQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcwWOARpdzj/KfkCdOtHf3ZTWzvEUm10qU+6Le/qa0tQIgUa2/3mo8m8EBbuT4tYdjLKXTF84whUUbad/9WIjl8uc="}]},"readme":"# quip\n\nAn exploration of a chainable API for response objects in node.\n\n* Suited to quick and easy prototyping\n* Works as a [Connect](http://github.com/extjs/Connect) filter\n\nDon't consider this a finished product, I'm just trying out some ideas, and\nthought I'd share what I have. I've been finding it useful to quickly put\ntogether APIs that respond with the correct status code and mime type.\n\n\n## Examples\n\n#### responding with different status codes\n\n    res.ok('<h1>Hello World!</h1>');\n    res.notFound('Not found');\n\n#### responding with different mime types\n\n    res.text('plain text');\n    res.json({'stringify': 'this object'});\n\n#### chaining the two together (in any order)\n\n    res.error().json({error: 'something broke'});\n    res.xml().badRequest('<test></test>');\n\n#### redirection\n\n    res.moved('http://permanent/new/location');\n    res.redirect('http://temporary/new/location');\n\n#### custom headers\n\n    res.headers({'custom': 'header'}).text('some data');\n\nThe response is completed when data is passed to a status code or mime-type\nfunction, or when a redirect is performed.\n\n\n## Usage\n\nAs a [Connect](http://github.com/extjs/Connect) filter:\n\n    var Connect = require('connect'),\n        quip = require('quip'),\n\n    Connect.createServer(\n        quip(),\n        function(req, res, next){\n            res.ok('test');\n        }\n    ).listen(8080);\n\nStandalone, without Connect:\n\n    var quip = require('quip'),\n        http = require('http');\n\n    http.createServer(function(req, res){\n        quip.update(res);\n        res.ok('test');\n    });\n\n\n## API\n\n* headers - add custom headers to response, returns updated response object\n* status - set status code of response manually, returns updated response\n* send - send data with the status code and headers already set, returns null\n\n### Status Codes\n\nBy default, the response will have the status code 200 (OK), this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\n\n#### Success\n* res.ok\n* res.created\n* res.accepted\n\n#### Redirection\n* res.moved\n* res.redirect\n* res.found - alias for redirect\n* res.notModified\n\n#### Client Error\n* res.badRequest\n* res.unauthorized\n* res.forbidden\n* res.notFound\n* res.notAllowed\n* res.conflict\n* res.gone\n\n#### Server Error\n* res.error\n\n### Mime Types\n\nBy default, the response will have the mime-type text/html, this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\n\n* res.text\n* res.plain\n* res.html\n* res.xhtml\n* res.css\n* res.xml\n* res.atom\n* res.rss\n* res.javascript\n* res.json\n\n* res.jsonp -- JSONP is a special case that __always__ completes the request,\n  and overrides any previous status code calls. There is no reliable way for\n  a browser to interpret JSONP responses with a status code other than 200.\n  Any error or status information should be included in the JSONP response\n  itself. The jsonp method accepts 2 arguments, a callback name (string) and\n  some JSON data (either a string or an object literal).\n","maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"directories":{}},"0.0.4":{"name":"quip","description":"A chainable API for response objects in node","main":"./index","author":{"name":"Caolan McMahon"},"version":"0.0.4","repository":{"type":"git","url":"http://github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"readme":"# quip\n\nAn exploration of a chainable API for response objects in node.\n\n* Suited to quick and easy prototyping\n* Works as a [Connect](http://github.com/extjs/Connect) filter\n\nDon't consider this a finished product, I'm just trying out some ideas, and\nthought I'd share what I have. I've been finding it useful to quickly put\ntogether APIs that respond with the correct status code and mime type.\n\n\n## Examples\n\n#### responding with different status codes\n\n    res.ok('<h1>Hello World!</h1>');\n    res.notFound('Not found');\n\n#### responding with different mime types\n\n    res.text('plain text');\n    res.json({'stringify': 'this object'});\n\n#### chaining the two together (in any order)\n\n    res.error().json({error: 'something broke'});\n    res.xml().badRequest('<test></test>');\n\n#### redirection\n\n    res.moved('http://permanent/new/location');\n    res.redirect('http://temporary/new/location');\n\n#### custom headers\n\n    res.headers({'custom': 'header'}).text('some data');\n\nThe response is completed when data is passed to a status code or mime-type\nfunction, or when a redirect is performed.\n\n\n## Usage\n\nAs a [Connect](http://github.com/extjs/Connect) filter:\n\n    var Connect = require('connect'),\n        quip = require('quip'),\n\n    Connect.createServer(\n        quip(),\n        function(req, res, next){\n            res.ok('test');\n        }\n    ).listen(8080);\n\nStandalone, without Connect:\n\n    var quip = require('quip'),\n        http = require('http');\n\n    http.createServer(function(req, res){\n        quip.update(res);\n        res.ok('test');\n    });\n\n\n## API\n\n* headers - add custom headers to response, returns updated response object\n* status - set status code of response manually, returns updated response\n* send - send data with the status code and headers already set, returns null\n\n### Status Codes\n\nBy default, the response will have the status code 200 (OK), this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\n\n#### Success\n* res.ok\n* res.created\n* res.accepted\n\n#### Redirection\n* res.moved\n* res.redirect\n* res.found - alias for redirect\n* res.notModified\n\n#### Client Error\n* res.badRequest\n* res.unauthorized\n* res.forbidden\n* res.notFound\n* res.notAllowed\n* res.conflict\n* res.gone\n\n#### Server Error\n* res.error\n\n### Mime Types\n\nBy default, the response will have the mime-type text/html, this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\n\n* res.text\n* res.plain\n* res.html\n* res.xhtml\n* res.css\n* res.xml\n* res.atom\n* res.rss\n* res.javascript\n* res.json\n\n* res.jsonp -- JSONP is a special case that __always__ completes the request,\n  and overrides any previous status code calls. There is no reliable way for\n  a browser to interpret JSONP responses with a status code other than 200.\n  Any error or status information should be included in the JSONP response\n  itself. The jsonp method accepts 2 arguments, a callback name (string) and\n  some JSON data (either a string or an object literal).\n","readmeFilename":"README.md","_id":"quip@0.0.4","dist":{"shasum":"c915fe6aa2ebfd4eabcf8a825d0f019b293561e9","tarball":"https://registry.npmjs.org/quip/-/quip-0.0.4.tgz","integrity":"sha512-mFUp8+UpYFCIk2CC1foqZU2WQKfxwqNnFlCpU79Ax065DhrUTwTPAHh70lAWzl0V/aY0/2i/WDJ4hRJBWaEQ7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyQawOmVqQm+nWyElZKgaw4AnKpEcKCxEzqe/hzcdc/AiEA2x8cjdw440Z8fwcMUAwtfrvSipJhJTWQtf5dVrV53CU="}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"caolan","email":"caolan.mcmahon@gmail.com"},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"directories":{}},"0.1.0":{"name":"quip","description":"A chainable API for response objects in node","version":"0.1.0","devDependencies":{"nodeunit":"0.8.1"},"main":"./lib/quip","author":{"name":"Caolan McMahon"},"repository":{"type":"git","url":"http://github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"scripts":{"test":"node_modules/.bin/nodeunit test"},"readme":"# quip\n\nA convenient chainable API for HTTP ServerResponse objects in node.\n\n* Suited to quick and easy prototyping\n* Works as a [Connect](http://github.com/extjs/Connect) middleware\n* Allows you to pipe streams to the response, while easily setting up\n  the headers and status code beforehand\n\n\n## Examples\n\n#### responding with different status codes\n\n```javascript\nres.ok('<h1>Hello World!</h1>');\nres.notFound('Not found');\n```\n\n#### responding with different mime types\n\n```javascript\nres.text('plain text');\nres.json({'stringify': 'this object'});\n```\n\n#### chaining the two together (in any order)\n\n```javascript\nres.error().json({error: 'something broke'});\nres.xml().badRequest('<test></test>');\n```\n\n#### redirection\n\n```javascript\nres.moved('http://permanent/new/location');\nres.redirect('http://temporary/new/location');\n```\n\n#### custom headers\n\n```javascript\nres.headers({'custom': 'header'}).text('some data');\n```\n\n#### piping data to a response object\n\n```javascript\nvar feed = fs.createReadStream('posts.xml');\nfeed.pipe(res.atom());\n```\n\nThe response is completed when data is passed to a status code or mime-type\nfunction, when a redirect is performed, or when a stream is piped to the\nresponse.\n\n\n## Usage\n\nUse quip for specific responses:\n\n    var quip = require('quip'),\n        http = require('http');\n\n    http.createServer(function (req, res) {\n        quip(res).ok('example');\n    });\n\nEnable for all response objects by using quip as a\n[Connect](http://www.senchalabs.org/connect/) middleware:\n\n    var connect = require('connect'),\n        quip = require('quip'),\n\n    var app = connect(\n        quip,\n        function (req, res, next) {\n            res.ok('example');\n        }\n    );\n\n\n## API\n\n* headers - add custom headers to response, returns updated response object\n* status - set status code of response manually, returns updated response\n\n### Status Codes\n\nBy default, the response will have the status code 200 (OK), this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together. If\nthe data passed is an object then it will be treated as JSON and the mime\ntype of the response will be updated accordingly.\n\n#### Success\n* res.ok\n* res.created\n* res.accepted\n\n#### Redirection\n* res.moved\n* res.redirect\n* res.found - alias for redirect\n* res.notModified\n\n#### Client Error\n* res.badRequest\n* res.unauthorized\n* res.forbidden\n* res.notFound\n* res.notAllowed\n* res.conflict\n* res.gone\n\n#### Server Error\n* res.error\n\n### Mime Types\n\nBy default, the response will have the mime-type text/html, this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\nYou can pass an object to the json and jsonp methods and it will be\nstringified before sending.\n\n* res.text\n* res.plain\n* res.html\n* res.xhtml\n* res.css\n* res.xml\n* res.atom\n* res.rss\n* res.javascript\n* res.json\n\n* res.jsonp -- JSONP is a special case that __always__ completes the request,\n  and overrides any previous status code calls. There is no reliable way for\n  a browser to interpret JSONP responses with a status code other than 200.\n  Any error or status information should be included in the JSONP response\n  itself. The jsonp method accepts 2 arguments, a callback name (string) and\n  some JSON data (either a string or an object literal).\n","readmeFilename":"README.md","_id":"quip@0.1.0","dist":{"shasum":"13692de659781837929c1d7165c0af95f9cf0fe2","tarball":"https://registry.npmjs.org/quip/-/quip-0.1.0.tgz","integrity":"sha512-EWKFSsvMFe9YkK6g3xK3R5iVg4Xj1pwO/AYJK/fslp+/UPMT7xZDKqKN24bPrjMfMgZpCx1trOhUohRnCFAeeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXXAI3NcvCHdcz22s6WyJ/tIUwITxccw5JEymiUXe8zAiBYnofHWEOttMAcsbJrvHbNF4vSrKNuE0mIGsKl3N/vgA=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"caolan","email":"caolan.mcmahon@gmail.com"},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"directories":{}},"0.1.1":{"name":"quip","description":"A chainable API for response objects in node","version":"0.1.1","devDependencies":{"nodeunit":"0.8.1"},"main":"./lib/quip","author":{"name":"Caolan McMahon"},"repository":{"type":"git","url":"http://github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"scripts":{"test":"node_modules/.bin/nodeunit test"},"readme":"# quip\n\nA convenient chainable API for HTTP ServerResponse objects in node.\n\n* Suited to quick and easy prototyping\n* Works as a [Connect](http://github.com/extjs/Connect) middleware\n* Allows you to pipe streams to the response, while easily setting up\n  the headers and status code beforehand\n\n\n## Examples\n\n#### responding with different status codes\n\n```javascript\nres.ok('<h1>Hello World!</h1>');\nres.notFound('Not found');\n```\n\n#### responding with different mime types\n\n```javascript\nres.text('plain text');\nres.json({'stringify': 'this object'});\n```\n\n#### chaining the two together (in any order)\n\n```javascript\nres.error().json({error: 'something broke'});\nres.xml().badRequest('<test></test>');\n```\n\n#### redirection\n\n```javascript\nres.moved('http://permanent/new/location');\nres.redirect('http://temporary/new/location');\n```\n\n#### custom headers\n\n```javascript\nres.headers({'custom': 'header'}).text('some data');\n```\n\n#### piping data to a response object\n\n```javascript\n// read posts.xml and pipe to response with mime type application/atom+xml\nvar feed = fs.createReadStream('posts.xml');\nfeed.pipe(res.atom());\n```\n\nThe response is completed when data is passed to a status code or mime-type\nfunction, when a redirect is performed, or when a stream is piped to the\nresponse.\n\n\n## Usage\n\nUse quip for specific responses:\n\n    var quip = require('quip'),\n        http = require('http');\n\n    http.createServer(function (req, res) {\n        quip(res).ok('example');\n    });\n\nEnable for all response objects by using quip as a\n[Connect](http://www.senchalabs.org/connect/) middleware:\n\n    var connect = require('connect'),\n        quip = require('quip'),\n\n    var app = connect(\n        quip,\n        function (req, res, next) {\n            res.ok('example');\n        }\n    );\n\n\n## API\n\n* headers - add custom headers to response, returns updated response object\n* status - set status code of response manually, returns updated response\n\n### Status Codes\n\nBy default, the response will have the status code 200 (OK), this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together. If\nthe data passed is an object then it will be treated as JSON and the mime\ntype of the response will be updated accordingly.\n\n#### Success\n* res.ok\n* res.created\n* res.accepted\n\n#### Redirection\n* res.moved\n* res.redirect\n* res.found - alias for redirect\n* res.notModified\n\n#### Client Error\n* res.badRequest\n* res.unauthorized\n* res.forbidden\n* res.notFound\n* res.notAllowed\n* res.conflict\n* res.gone\n\n#### Server Error\n* res.error\n\n### Mime Types\n\nBy default, the response will have the mime-type text/html, this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\nYou can pass an object to the json and jsonp methods and it will be\nstringified before sending.\n\n* res.text\n* res.plain\n* res.html\n* res.xhtml\n* res.css\n* res.xml\n* res.atom\n* res.rss\n* res.javascript\n* res.json\n\n* res.jsonp -- JSONP is a special case that __always__ completes the request,\n  and overrides any previous status code calls. There is no reliable way for\n  a browser to interpret JSONP responses with a status code other than 200.\n  Any error or status information should be included in the JSONP response\n  itself. The jsonp method accepts 2 arguments, a callback name (string) and\n  some JSON data (either a string or an object literal).\n","readmeFilename":"README.md","_id":"quip@0.1.1","dist":{"shasum":"7206d6ab1431d14b75d4fe2154c457a22a77ae0c","tarball":"https://registry.npmjs.org/quip/-/quip-0.1.1.tgz","integrity":"sha512-M65+2qXuwcVLv8SOW2wcobPHfKysJeLiO6W/+kNx7aUHIfbBxlVKPBS9eeExKEb1GIYz9RabPc33UbL8JHjlIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKrNmFal9xRPwi2gy9uIfiPTC3EhtpqLky0uwClZvrQAiEAijAniCjSm3FPVOMWdVnlc4chmKocIvfPKxqtnC+onu8="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"caolan","email":"caolan.mcmahon@gmail.com"},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"directories":{}},"0.1.2":{"name":"quip","description":"A chainable API for response objects in node","version":"0.1.2","devDependencies":{"nodeunit":"0.8.1"},"main":"./lib/quip","author":{"name":"Caolan McMahon"},"repository":{"type":"git","url":"http://github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"scripts":{"test":"node_modules/.bin/nodeunit test"},"readme":"# quip\n\nA convenient chainable API for HTTP ServerResponse objects in node.\n\n* Suited to quick and easy prototyping\n* Works as a [Connect](http://github.com/extjs/Connect) middleware\n* Allows you to pipe streams to the response, while easily setting up\n  the headers and status code beforehand\n\n\n## Examples\n\n#### responding with different status codes\n\n```javascript\nres.ok('<h1>Hello World!</h1>');\nres.notFound('Not found');\n```\n\n#### responding with different mime types\n\n```javascript\nres.text('plain text');\nres.json({'stringify': 'this object'});\n```\n\n#### chaining the two together (in any order)\n\n```javascript\nres.error().json({error: 'something broke'});\nres.xml().badRequest('<test></test>');\n```\n\n#### redirection\n\n```javascript\nres.moved('http://permanent/new/location');\nres.redirect('http://temporary/new/location');\n```\n\n#### custom headers\n\n```javascript\nres.headers({'custom': 'header'}).text('some data');\n```\n\n#### piping data to a response object\n\n```javascript\n// read posts.xml and pipe to response with mime type application/atom+xml\nvar feed = fs.createReadStream('posts.xml');\nfeed.pipe(res.atom());\n```\n\nThe response is completed when data is passed to a status code or mime-type\nfunction, when a redirect is performed, or when a stream is piped to the\nresponse.\n\n\n## Usage\n\nUse quip for specific responses:\n\n    var quip = require('quip'),\n        http = require('http');\n\n    http.createServer(function (req, res) {\n        quip(res).ok('example');\n    });\n\nEnable for all response objects by using quip as a\n[Connect](http://www.senchalabs.org/connect/) middleware:\n\n    var connect = require('connect'),\n        quip = require('quip'),\n\n    var app = connect(\n        quip,\n        function (req, res, next) {\n            res.ok('example');\n        }\n    );\n\n\n## API\n\n* headers - add custom headers to response, returns updated response object\n* status - set status code of response manually, returns updated response\n\n### Status Codes\n\nBy default, the response will have the status code 200 (OK), this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together. If\nthe data passed is an object then it will be treated as JSON and the mime\ntype of the response will be updated accordingly.\n\n#### Success\n* res.ok\n* res.created\n* res.accepted\n\n#### Redirection\n* res.moved\n* res.redirect\n* res.found - alias for redirect\n* res.notModified\n\n#### Client Error\n* res.badRequest\n* res.unauthorized\n* res.forbidden\n* res.notFound\n* res.notAllowed\n* res.conflict\n* res.gone\n\n#### Server Error\n* res.error\n\n### Mime Types\n\nBy default, the response will have the mime-type text/html, this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\nYou can pass an object to the json and jsonp methods and it will be\nstringified before sending.\n\n* res.text\n* res.plain\n* res.html\n* res.xhtml\n* res.css\n* res.xml\n* res.atom\n* res.rss\n* res.javascript\n* res.json\n\n* res.jsonp -- JSONP is a special case that __always__ completes the request,\n  and overrides any previous status code calls. There is no reliable way for\n  a browser to interpret JSONP responses with a status code other than 200.\n  Any error or status information should be included in the JSONP response\n  itself. The jsonp method accepts 2 arguments, a callback name (string) and\n  some JSON data (either a string or an object literal).\n","readmeFilename":"README.md","_id":"quip@0.1.2","dist":{"shasum":"f9a865ac354a0e2326d9b1fc1ce7e6ad3c23db9d","tarball":"https://registry.npmjs.org/quip/-/quip-0.1.2.tgz","integrity":"sha512-7iLJouR5GtF9jzyNbbcK4kHt92ucbcjn+lBkKeRtbh4UagwcO6qG715hZJf0BonAACxAZepaqhpHJIOV09EDGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIG/wVB8IhOwqNQZ9gxYhQzKJSKkTz6dv2lkiAUccaGAiB6NVWJDpilj+7hcl42bNDfdnZ2PLZ6sOZS6tLv0bAPBg=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"caolan","email":"caolan.mcmahon@gmail.com"},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"directories":{}},"0.1.3":{"name":"quip","description":"A chainable API for response objects in node","version":"0.1.3","devDependencies":{"nodeunit":"0.8.1"},"main":"./lib/quip","author":{"name":"Caolan McMahon"},"repository":{"type":"git","url":"git+ssh://git@github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"scripts":{"test":"nodeunit test"},"gitHead":"add324447e0eed26117ee338a0ce39dea76e502e","homepage":"https://github.com/caolan/quip#readme","_id":"quip@0.1.3","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-N+FaHxzTATftxSXLFw9VxkPteXcHwrGYsTioBL8Qi4sJyWK9BUeUJ5hqpM35uyaICCXcoQIIe13Ma9xz9zJxZQ==","shasum":"665b44878fa2535e27b97ed035df4e0045e6451a","tarball":"https://registry.npmjs.org/quip/-/quip-0.1.3.tgz","fileCount":6,"unpackedSize":21254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeN++uCRA9TVsSAnZWagAASGAP/jczydOUd/ZPRCQe0kpf\n7cJ8MyoD4zDa/9wuWYsAiyNcDNvD8Y3aSTowXHhkCAAcYfYaB4m4fGauYwYo\nVjzoGWJrQEqa8MKwRVfcXjzp2ZDMZieRyg+AwaFxbhm8Zrh+RlL8QQ2uIL4Q\nF7h6v39DSO8xp6/GqkFWCK5CJjWTdhmJXoh5DyJnosd83su2Tq7VPkFT+uic\nMPLIFUiuRLhKuSNEI0h1l140IVHbF7yuGzGIg+HhN9HwXGXcKNf41MhHwBya\nzpLQw8h0ubXHNdX50fxrfK7NlV3Z6MtIDPvTRp33bOScBA0mVemP11g8PYDm\n16pvoaEaoNRwuJCcvSLSoE5MpJIEDebbQFEc5TQpH7rRFcAq1AMrj8sshUTF\nFfhtw42CbzctQJKD3GBUtFrjPJJApsPYYNINDG3oYuUKvqt2sqbSDOJPV0qf\nTVKG+sNAPNCe+/l9KKCWwJMS9DHzYHV/wYhwVTGB+yZtDh5dk3QdjqHmeHZa\nHnuPcL3px/w5K5zyUwobFwUlqF1Ly7uEsbjAIoe3gwAcBEq3ZwzdkO9OZlZF\nNCerLqyZn63RMX4xXq2C0zqUpPY3PmzpFQPsX5eEIpfmjnBL+NFXMuhEGfDz\njXg5hHS2+VgUR6Y/B9R3i17fSLNjhBFr0kWr7MZatNqsPYUTmaIIi8BNRw60\nNQFR\r\n=wEBj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4blKo2FtStzZJuA+0ORCjstTt43bNQMkmWv45RrqwUgIhAJ+Y+Q64xkEHveyP6I0gW9NdYHFUbn2xeIHD3e+v0K+n"}]},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"_npmUser":{"name":"caolan","email":"caolan.mcmahon@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quip_0.1.3_1580724142002_0.7426868943292946"},"_hasShrinkwrap":false},"0.2.0":{"name":"quip","description":"A chainable API for response objects in node","version":"0.2.0","devDependencies":{"nodeunit":"0.11.3"},"main":"./lib/quip","author":{"name":"Caolan McMahon"},"repository":{"type":"git","url":"git+ssh://git@github.com/caolan/quip.git"},"bugs":{"url":"http://github.com/caolan/quip/issues"},"licenses":[{"type":"MIT","url":"http://github.com/caolan/quip/raw/master/LICENSE"}],"scripts":{"test":"nodeunit test/*.js"},"gitHead":"0279534b481d4501fd4854c83e9421d594fb216a","homepage":"https://github.com/caolan/quip#readme","_id":"quip@0.2.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-91wu7q/DYG75lx7AU/MUtpi3Bw3AxMWusEbLN9+DaSSaJhTJ41oR3ay6ALCczyQd7HdzrBqyInO/s+JwjqoLjg==","shasum":"b38c6010ca12353c149755b506719779143d109b","tarball":"https://registry.npmjs.org/quip/-/quip-0.2.0.tgz","fileCount":6,"unpackedSize":23514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOAdxCRA9TVsSAnZWagAAkx4P/ReJKbpqYZvt142/gjLg\nGKFld6QtuvgyaIvA2OidBriaDdtHzYC7P7SvS9VGA0Igid9QfcNwubJansiy\nv5mqgVIIuC8PTuj1l1w0hYa+uNDoruog1NHx3JJqWMRoyo+OHSHOrYnZ03f1\nNrRFne1SSnm5dYNRjH6nuJ/I6vdbi4AFd4NT9ohA8b95FxQJYDMDMNpB6+s8\n+aXTulgu0H7fonpZp1wsVvxoVQrlfgX4E7yYD1j7m2Yydn68GEr5iBGvlXaJ\nYCHbFWOb1TKYTpb0X3ZVMjngfBlciym11rY/kiqYdf+TIrjpx4eK1uhr4Wvp\ni+Sf+HjtkFC1tkUi45wxwg+hJG7W2/mKFS/mnzVIxsuF9x8E0hrvSixv+agS\nFXqHph3JThAfXu86QEofx9RaogWvL1SHMgPdra9482RxoJ6mYDQR29WCnkyn\nTyjCirEODy7QiIQ35cd6Mzyvhcy3F+SPZTDmbE55EUQvYGL8t3nVkhUCVjAT\nj0G3zK7yF9lb/jBn5bG2gUxTE7+5pwCYKoUaKkSvKA74WrTdBDPM34w5rlpu\noaT2fq4f03aIYyKNKHtrAnUCMKoxGTtCHbohra+v6LY+md/ad2HRETK/8sEL\nIgjv14KMsEVws2REw6f/Aa183uSwnqysdNpIWOLlZ2o7pyHV0tUjC/vIEKE1\nBRdz\r\n=y2ZW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEB7aHOmVaP1+NyoG/Z0yWA30qWKCwFpo/oZ3olygoSAiAZi23zJ0vnKzhMVoWthcXCldpwMiJdGDDmv3DsNLWU0A=="}]},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"_npmUser":{"name":"caolan","email":"caolan.mcmahon@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quip_0.2.0_1580730224698_0.18567582883352585"},"_hasShrinkwrap":false}},"maintainers":[{"name":"caolan","email":"caolan@caolanmcmahon.com"}],"author":{"name":"Caolan McMahon"},"repository":{"type":"git","url":"git+ssh://git@github.com/caolan/quip.git"},"time":{"modified":"2022-06-25T07:42:09.923Z","created":"2011-03-20T10:21:57.772Z","0.0.1":"2011-03-20T10:21:57.772Z","0.0.2":"2011-03-20T10:21:57.772Z","0.0.3":"2012-02-13T00:48:05.193Z","0.0.4":"2013-03-02T22:08:09.554Z","0.1.0":"2013-07-20T19:10:32.406Z","0.1.1":"2013-07-27T21:09:27.145Z","0.1.2":"2013-12-04T11:36:13.512Z","0.1.3":"2020-02-03T10:02:22.143Z","0.2.0":"2020-02-03T11:43:44.839Z"},"users":{},"homepage":"https://github.com/caolan/quip#readme","bugs":{"url":"http://github.com/caolan/quip/issues"},"readme":"# quip\n\nA convenient chainable API for HTTP ServerResponse objects in node.\n\n* Suited to quick and easy prototyping\n* Works as a [Connect](http://github.com/extjs/Connect) middleware\n* Allows you to pipe streams to the response, while easily setting up\n  the headers and status code beforehand\n\n\n## Examples\n\n#### responding with different status codes\n\n```javascript\nres.ok('<h1>Hello World!</h1>');\nres.notFound('Not found');\n```\n\n#### responding with different mime types\n\n```javascript\nres.text('plain text');\nres.json({'stringify': 'this object'});\n```\n\n#### chaining the two together (in any order)\n\n```javascript\nres.error().json({error: 'something broke'});\nres.xml().badRequest('<test></test>');\n```\n\n#### redirection\n\n```javascript\nres.moved('http://permanent/new/location');\nres.redirect('http://temporary/new/location');\n```\n\n#### custom headers\n\n```javascript\nres.headers({'custom': 'header'}).text('some data');\n```\n\n#### piping data to a response object\n\n```javascript\n// read posts.xml and pipe to response with mime type application/atom+xml\nvar feed = fs.createReadStream('posts.xml');\nfeed.pipe(res.atom());\n```\n\nThe response is completed when data is passed to a status code or mime-type\nfunction, when a redirect is performed, or when a stream is piped to the\nresponse.\n\n\n## Usage\n\nUse quip for specific responses:\n\n    var quip = require('quip'),\n        http = require('http');\n\n    http.createServer(function (req, res) {\n        quip(res).ok('example');\n    });\n\nEnable for all response objects by using quip as a\n[Connect](http://www.senchalabs.org/connect/) middleware:\n\n    var connect = require('connect'),\n        quip = require('quip'),\n\n    var app = connect(\n        quip,\n        function (req, res, next) {\n            res.ok('example');\n        }\n    );\n\n\n## API\n\n* headers - add custom headers to response, returns updated response object\n* status - set status code of response manually, returns updated response\n\n### Status Codes\n\nBy default, the response will have the status code 200 (OK), this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together. If\nthe data passed is an object then it will be treated as JSON and the mime\ntype of the response will be updated accordingly.\n\n#### Success\n* res.ok\n* res.created\n* res.accepted\n* res.noContent\n\n#### Redirection\n* res.moved\n* res.redirect\n* res.found - alias for redirect\n* res.notModified\n\n#### Client Error\n* res.badRequest\n* res.unauthorized\n* res.forbidden\n* res.notFound\n* res.notAllowed\n* res.conflict\n* res.gone\n\n#### Server Error\n* res.error\n\n### Mime Types\n\nBy default, the response will have the mime-type text/html, this can\nbe updated using the following methods. Note that by passing some data\nto these methods, the response will complete. If you don't pass data it will\nreturn an updated response object, allowing you to chain calls together.\nYou can pass an object to the json and jsonp methods and it will be\nstringified before sending.\n\n* res.text\n* res.plain\n* res.html\n* res.xhtml\n* res.css\n* res.xml\n* res.atom\n* res.rss\n* res.javascript\n* res.json\n\n* res.jsonp -- JSONP is a special case that __always__ completes the request,\n  and overrides any previous status code calls. There is no reliable way for\n  a browser to interpret JSONP responses with a status code other than 200.\n  Any error or status information should be included in the JSONP response\n  itself. The jsonp method accepts 2 arguments, a callback name (string) and\n  some JSON data (either a string or an object literal).\n","readmeFilename":"README.md"}