http-msgs
httpMsgs
req and res are request and responce objects
httpMsgs.sendJSON = function(req, res, data)
This send json object back after with success
data = retun data is in JSON format
httpMsg.send200 = function(req, res)
This send only 200 status but not data returned
httpMsgs.send500 = function(req,res,err)
This sends error status with error messages
err = this contains error message
httpMsgs.send405= function(req, res)
Method not supporetd i.e request.methods supported
- GET
- POST
httpMsags.send404= function(req, res)
Requested page not availeble
httpMsgs.send413 = function(req, res)
Requesting for large data, not supported.