if(req.headers['content-type'].indexOf("application/json") < 0) {
     err = new Error();
     err.status = 400;
     err.error = "Invalid content type";
     err.message = "Valid content type is 'application/json'";