npm-default-response
v0.0.1
Published
Get a default RESTful response body
Downloads
1
Readme
Default Response
Simple API "default message" module for use with RESTful APIs.
Installation
npm install default-response --save
Usage
// include default response
var defaultResponse = require('default-response');
// set a status
console.log(defaultResponse.status(404));
/*
Returns:
{
"status": "404",
"message": "Not found",
"developerMessage": "The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.",
"error": "ClientError"
}
*/