New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hapi-status

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-status

Easily add status code and headers to a response in Hapi

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

npm version travis ci Coverage Status

Hapi Status

Easily reply to your request with a statusCode and optional headers

Install

npm install hapi-status --save

Usage

var status = require('hapi-status');

// ...

server.route({
	method: 'GET',
	path: '/'
	handler: function(request, reply) {
		var result = 'whatever you want to give back to the client';

		return status.ok(reply, result);
	}
});

// ...

Available methods

1xx - Informational

  • continue
  • switchingProtocols
  • processing

2xx - Successful

  • ok
  • created
  • accepted
  • nonAuthoritativeInformation
  • noContent
  • resetContent
  • partialContent
  • multiStatus

3xx - Redirection

  • multipleChoices
  • movedPermanently
  • movedTemporarily
  • seeOther
  • notModified
  • useProxy
  • unused
  • temporaryRedirect

4xx - Client Error

  • badRequest
  • unauthorized
  • paymentRequired
  • forbidden
  • notFound
  • methodNotAllowed
  • notAcceptable
  • proxyAuthenticationRequired
  • requestTimeout
  • conflict
  • gone
  • lengthRequired
  • preconditionFailed
  • requestEntityTooLarge
  • requestUriTooLong
  • unsupportedMediaType
  • requestedRangeNotSatisfiable
  • expectationFailed
  • iAmATeapot
  • unprocessableEntity
  • locked
  • failedDependency
  • upgradeRequired
  • preconditionRequired
  • tooManyRequests
  • requestHeaderFieldsTooLarge
  • unavailableForLegalReasons

5xx - Server Error

  • internalServerError
  • notImplemented
  • badGateway
  • serviceUnavailable
  • gatewayTimeout
  • httpVersionNotSupported
  • insufficientStorage
  • networkAuthenticationRequired-

Keywords

FAQs

Package last updated on 24 Jun 2016

Did you know?

Socket

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.

Install

Related posts

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