Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "http-msgs", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Node module to handle to HTTP status codes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# http-msgs | ||
Node module to handle to HTTP status codes | ||
 | ||
 | ||
 | ||
@@ -6,0 +6,0 @@ |
@@ -8,3 +8,3 @@ let contentTypeJSON ={"Content-Type" : "application/json"} | ||
exports.movedPermently = function(req, res, url, resEnd=true){ | ||
// redirect temporary | ||
// moved permently | ||
res.writeHead(301,{Location: url } ); | ||
@@ -17,3 +17,3 @@ if(resEnd){ | ||
// redirect temporary | ||
res.writeHead(301,{Location: url } ); | ||
res.writeHead(307,{Location: url } ); | ||
if(resEnd){ | ||
@@ -26,3 +26,3 @@ res.end(); | ||
// redirect perment | ||
res.writeHead(301,{Location: url } ); | ||
res.writeHead(308,{Location: url } ); | ||
if(resEnd){ | ||
@@ -29,0 +29,0 @@ res.end(); |
9797