       else
         json_response = JSON.stringify {result: "All text messages deleted from DB"}
 
-      res.writeHead status_code, JSON_CONTENT
+      res.writeHead status_code, {"Content-Type": "application/json"}
       console.log "Response: #{json_response}"
       res.end json_response
   else
     status_code = 401 # unauthorized
     json_response = JSON.stringify {result: "Not an authorized action, sorry."}
 
-    res.writeHead status_code, JSON_CONTENT
+    res.writeHead status_code, {"Content-Type": "application/json"}
     console.log "Response: #{json_response}"
     res.end json_response
TextMessage = require '../models/TextMessage'
util = require 'util'

JSON_CONTENT = {"Content-Type": "application/json"}

module.exports.showAll = (req, res) ->
  console.log "GET to '/message/all'"

      status_code = 200 # ok
      json_response = JSON.stringify msgs

    res.writeHead status_code, {
      "Content-Type": "application/json"
      "Pragma": "no-cache"
      "Cache-Control": "s-maxage=0, max-age=0, must-revalidate, no-cache"
    }

    console.log "Response: #{json_response}"
    res.end json_response
    
