lib/middleware.js
function httpOk(response,isHead,body) {
  response.setHeader(HTTP_CONTENT_TYPE,MIME_TYPE_JAVASCRIPT);
  response.setHeader(HTTP_CONTENT_LENGTH,body.length);
  response.statusCode = HTTP_OK;
  if (isHead) response.end();
  else response.end(body);
}
function httpOk(response,isHead,body) {
  response.setHeader(HTTP_CONTENT_TYPE,MIME_TYPE_JAVASCRIPT);
  response.setHeader(HTTP_CONTENT_LENGTH,body.length);
  response.statusCode = HTTP_OK;
  if (isHead) response.end();
  else response.end(body);
}
function httpOk ( response , isHead , body ) { response . setHeader ( HTTP_CONTENT_TYPE , MIME_TYPE_JAVASCRIPT ) ; response . setHeader ( HTTP_CONTENT_LENGTH , body . length ) ; response . statusCode = HTTP_OK ; if ( isHead ) response . end ( ) ; else response . end ( body ) ; }
Helper method to response with an HTTP ok with a body, when the isHead is true then no body is returned
Helper method to response with an HTTP ok with a body when the isHead is true then no body is returned