Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
express-status
Advanced tools
Extends express respons prototype with status codes
The purpose of this library is to remove magic numbers from your code and define the status codes in one place.
test with code coverage
gulp
test only
gulp test
<a name="module_express-status"></a>
Exports an object with status codes and extends the express request object by adding a method that will set the status code and return the request object.
Example
var statusCodes = require()
sets res status code to 400
Kind: static method of express-status
Example
function(req, res){
res.badRequest().end();
}
sets res status code to 401
Kind: static method of express-status
Example
function(req, res){
res.unauthorized().end();
}
sets res status code to 403
Kind: static method of express-status
Example
function(req, res){
res.forbidden().end();
}
sets res status code to 404
Kind: static method of express-status
Example
function(req, res){
res.notFound().end();
}
sets res status code to 405
Kind: static method of express-status
Example
function(req, res){
res.methodNotAllowed().end();
}
sets res status code to 406
Kind: static method of express-status
Example
function(req, res){
res.notAcceptable().end();
}
sets res status code to 407
Kind: static method of express-status
Example
function(req, res){
res.proxyAuthenticationRequired().end();
}
sets res status code to 408
Kind: static method of express-status
Example
function(req, res){
res.requestTimeout().end();
}
sets res status code to 409
Kind: static method of express-status
Example
function(req, res){
res.conflict().end();
}
sets res status code to 410
Kind: static method of express-status
Example
function(req, res){
res.gone().end();
}
sets res status code to 411
Kind: static method of express-status
Example
function(req, res){
res.lengthRequired().end();
}
sets res status code to 412
Kind: static method of express-status
Example
function(req, res){
res.preconditionFailed().end();
}
sets res status code to 413
Kind: static method of express-status
Example
function(req, res){
res.requestEntityTooLarge().end();
}
sets res status code to 414
Kind: static method of express-status
Example
function(req, res){
res.requestUriTooLang().end();
}
sets res status code to 415
Kind: static method of express-status
Example
function(req, res){
res.unsupportedMediaType().end();
}
sets res status code to 416
Kind: static method of express-status
Example
function(req, res){
res.requestedRangeNotSatisfiable().end();
}
sets res status code to 417
Kind: static method of express-status
Example
function(req, res){
res.expectationFailed().end();
}
sets res status code to 418
Kind: static method of express-status
Example
function(req, res){
res.imATeapot().end();
}
sets res status code to 419
Kind: static method of express-status
Example
function(req, res){
res.authenticationTimeout().end();
}
sets res status code to 423
Kind: static method of express-status
Example
function(req, res){
res.locked().end();
}
sets res status code to 424
Kind: static method of express-status
Example
function(req, res){
res.failedDependency().end();
}
sets res status code to 426
Kind: static method of express-status
Example
function(req, res){
res.upgradeRequired().end();
}
sets res status code to 428
Kind: static method of express-status
Example
function(req, res){
res.preconditionRequired().end();
}
sets res status code to 429
Kind: static method of express-status
Example
function(req, res){
res.tooManyRequests().end();
}
sets res status code to 431
Kind: static method of express-status
Example
function(req, res){
res.requestHeaderFieldTooLarge().end();
}
sets res status code to 440
Kind: static method of express-status
Example
function(req, res){
res.loginTimeout().end();
}
sets res status code to 451
Kind: static method of express-status
Example
function(req, res){
res.unavailableForLegalReasons().end();
}
sets res status code to 500
Kind: static method of express-status
Example
function(req, res){
res.internalServerError().end();
}
sets res status code to 501
Kind: static method of express-status
Example
function(req, res){
res.notImplemented().end();
}
sets res status code to 502
Kind: static method of express-status
Example
function(req, res){
res.badGateway().end();
}
sets res status code to 503
Kind: static method of express-status
Example
function(req, res){
res.serviceUnavailable().end();
}
sets res status code to 504
Kind: static method of express-status
Example
function(req, res){
res.gatewayTimeout().end();
}
sets res status code to 505
Kind: static method of express-status
Example
function(req, res){
res.httpVersionNutSupported().end();
}
sets res status code to 506
Kind: static method of express-status
Example
function(req, res){
res.variantAlsoNegotiates().end();
}
sets res status code to 507
Kind: static method of express-status
Example
function(req, res){
res.insufficientStorage().end();
}
sets res status code to 508
Kind: static method of express-status
Example
function(req, res){
res.loopDetected().end();
}
sets res status code to 510
Kind: static method of express-status
Example
function(req, res){
res.notExtended().end();
}
sets res status code to 511
Kind: static method of express-status
Example
function(req, res){
res.notExtended().end();
}
FAQs
status code response helper
The npm package express-status receives a total of 84 weekly downloads. As such, express-status popularity was classified as not popular.
We found that express-status demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.