Socket
Socket
Sign inDemoInstall

http-msgs

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-msgs - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "http-msgs",
"version": "0.0.1",
"version": "0.0.2",
"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
![verson](https://img.shields.io/badge/version-0.0.1-green.svg)
![verson](https://img.shields.io/badge/version-0.0.2-green.svg)
![License](https://img.shields.io/badge/License-MIT-yellowgreen.svg)
This module sets the the http messages for nodes http server
This module sets the the http messages for node's http server
it usess `request` and `responce` arguments of`http`
`resEnd` argument is boolen by defulat it is set to true
if set set to true it trigeers `res.end()`. if sets to false call function has explicitly call `res.end()` to end responce to client application.
`resEnd` argument is boolen, by defulat it is set to true
if set set to true it trigeers `res.end()`. if sets to false, call function has explicitly call `res.end()` to end responce to client application.
## 200 and plus
```
httpMsgs.sendJSON 1eq, res, data, resEnd)
httpMsgs.sendJSON(req, res, data, resEnd)
This send json object back after with success

@@ -24,7 +24,7 @@ data = retun data is in JSON format

```
httpMsgs.movedPermently = function(req, res, url, resEnd)
httpMsgs.movedPermently(req, res, url, resEnd)
moved permentantly
```
```
httpMsgs.redirectTemporary = function(req, res, url, resEnd)
httpMsgs.redirectTemporary(req, res, url, resEnd)
Temporary redirect

@@ -34,3 +34,3 @@ ```

```
httpMsgs.redirectPerment = function(req, res, url, resEnd)
httpMsgs.redirectPerment(req, res, url, resEnd)
perment redirect

@@ -46,7 +46,7 @@ ```

```
httpMsags.send404= function(req, res, resEnd)
httpMsags.send404(req, res, resEnd)
Requested page not availeble
```
```
httpMsgs.send413 = function(req, res, resEnd)
httpMsgs.send413 (req, res, resEnd)
Requesting for large data, not supported.

@@ -62,1 +62,3 @@ ```

```
For more extensive study on read in this link [HTTP status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc