api documentation for hapi (v16.1.0)

HTTP Server framework

table of contents

  1. module hapi
    1. function hapi.Server (options)
    2. function hapi.Server.super_ (server, connections, env, parent)
    3. function hapi.auth (connection)
    4. function hapi.compression ()
    5. function hapi.connection (server, options)
    6. function hapi.ext (type, server)
    7. function hapi.methods (server)
    8. function hapi.protect (request)
    9. function hapi.reply ()
    10. function hapi.request ()
    11. function hapi.response (source, request, options)
    12. function hapi.route (route, connection, plugin, options)
    13. object hapi.Server.prototype
    14. object hapi.Server.super_.prototype
    15. object hapi.Server.super_.super_.prototype
    16. object hapi.auth.prototype
    17. object hapi.compression.prototype
    18. object hapi.connection.prototype
    19. object hapi.cors
    20. object hapi.ext.prototype
    21. object hapi.handler
    22. object hapi.methods.prototype
    23. object hapi.promises
    24. object hapi.protect.prototype
    25. object hapi.reply.prototype
    26. object hapi.request.prototype
    27. object hapi.response.prototype
    28. object hapi.route.prototype
    29. object hapi.schema
    30. object hapi.transmit
    31. object hapi.validation
  2. module hapi.Server
    1. function hapi.Server (options)
    2. function hapi.Server.super_ (server, connections, env, parent)
  3. module hapi.Server.prototype
    1. function hapi.Server.prototype._createCache (options, _callback)
    2. function hapi.Server.prototype._invoke (type, next)
    3. function hapi.Server.prototype._start (callback)
    4. function hapi.Server.prototype._validateDeps ()
    5. function hapi.Server.prototype.connection (options)
    6. function hapi.Server.prototype.initialize (callback)
    7. function hapi.Server.prototype.start (callback)
    8. function hapi.Server.prototype.stop ()
  4. module hapi.Server.super_
    1. function hapi.Server.super_ (events)
  5. module hapi.Server.super_.prototype
    1. function hapi.Server.super_.prototype._apply (type, func, args)
    2. function hapi.Server.super_.prototype._applyChild (type, child, func, args)
    3. function hapi.Server.super_.prototype._clone (connections, plugin)
    4. function hapi.Server.super_.prototype._ext (event)
    5. function hapi.Server.super_.prototype._log (tags, data)
    6. function hapi.Server.super_.prototype._select (labels, plugin)
    7. function hapi.Server.super_.prototype._single ()
    8. function hapi.Server.super_.prototype.bind (context)
    9. function hapi.Server.super_.prototype.cache (options, _segment)
    10. function hapi.Server.super_.prototype.decoder (encoding, decoder)
    11. function hapi.Server.super_.prototype.decorate (type, property, method, options)
    12. function hapi.Server.super_.prototype.dependency (dependencies, after)
    13. function hapi.Server.super_.prototype.emit (criteria, data, callback)
    14. function hapi.Server.super_.prototype.encoder (encoding, encoder)
    15. function hapi.Server.super_.prototype.event (event)
    16. function hapi.Server.super_.prototype.expose (key, value)
    17. function hapi.Server.super_.prototype.ext (events)
    18. function hapi.Server.super_.prototype.handler (name, method)
    19. function hapi.Server.super_.prototype.inject (options, callback)
    20. function hapi.Server.super_.prototype.log (tags, data, timestamp, _internal)
    21. function hapi.Server.super_.prototype.lookup (id)
    22. function hapi.Server.super_.prototype.match (method, path, host)
    23. function hapi.Server.super_.prototype.method (name, method, options)
    24. function hapi.Server.super_.prototype.path (relativeTo)
    25. function hapi.Server.super_.prototype.register (plugins)
    26. function hapi.Server.super_.prototype.route (options)
    27. function hapi.Server.super_.prototype.select ()
    28. function hapi.Server.super_.prototype.state (name, options)
    29. function hapi.Server.super_.prototype.table (host)
  6. module hapi.Server.super_.super_.prototype
    1. function hapi.Server.super_.super_.prototype._emit (criteria, data, generated, callback)
    2. function hapi.Server.super_.super_.prototype.addListener (criteria, listener)
    3. function hapi.Server.super_.super_.prototype.emit (criteria, data, callback)
    4. function hapi.Server.super_.super_.prototype.hasListeners (name)
    5. function hapi.Server.super_.super_.prototype.on (criteria, listener)
    6. function hapi.Server.super_.super_.prototype.once (criteria, listener)
    7. function hapi.Server.super_.super_.prototype.registerEvent (events)
    8. function hapi.Server.super_.super_.prototype.registerPodium (podiums)
    9. function hapi.Server.super_.super_.prototype.removeAllListeners (name)
    10. function hapi.Server.super_.super_.prototype.removeListener (name, listener)
  7. module hapi.auth
    1. function hapi.auth (connection)
    2. function hapi.auth.access (request, route)
    3. function hapi.auth.authenticate (request, next)
    4. function hapi.auth.payload (request, next)
    5. function hapi.auth.response (request, next)
  8. module hapi.auth.prototype
    1. function hapi.auth.prototype._authenticate (request, next)
    2. function hapi.auth.prototype._setupRoute (options, path)
    3. function hapi.auth.prototype.default (options)
    4. function hapi.auth.prototype.lookup (route)
    5. function hapi.auth.prototype.scheme (name, scheme)
    6. function hapi.auth.prototype.strategy (name, scheme)
    7. function hapi.auth.prototype.test (name, request, next)
  9. module hapi.compression
    1. function hapi.compression ()
  10. module hapi.compression.prototype
    1. function hapi.compression.prototype.accept (request)
    2. function hapi.compression.prototype.addDecoder (encoding, decoder)
    3. function hapi.compression.prototype.addEncoder (encoding, encoder)
    4. function hapi.compression.prototype.encoder (request, encoding)
    5. function hapi.compression.prototype.encoding (response)
  11. module hapi.connection
    1. function hapi.connection (server, options)
    2. function hapi.connection.super_ (events)
    3. object hapi.connection._events
  12. module hapi.connection.prototype
    1. function hapi.connection.prototype._addRoute (config, plugin)
    2. function hapi.connection.prototype._defaultRoutes ()
    3. function hapi.connection.prototype._dispatch (options)
    4. function hapi.connection.prototype._ext (event)
    5. function hapi.connection.prototype._init ()
    6. function hapi.connection.prototype._route (configs, plugin)
    7. function hapi.connection.prototype._start (callback)
    8. function hapi.connection.prototype._stop (options, callback)
    9. function hapi.connection.prototype.decoder (encoding, decoder)
    10. function hapi.connection.prototype.encoder (encoding, encoder)
    11. function hapi.connection.prototype.inject (options, callback)
    12. function hapi.connection.prototype.lookup (id)
    13. function hapi.connection.prototype.match (method, path, host)
    14. function hapi.connection.prototype.table (host)
  13. module hapi.cors
    1. function hapi.cors.handler (connection)
    2. function hapi.cors.headers (response)
    3. function hapi.cors.matchOrigin (origin, settings)
    4. function hapi.cors.options (route, connection, server)
    5. function hapi.cors.route (options)
  14. module hapi.ext
    1. function hapi.ext (type, server)
  15. module hapi.ext.prototype
    1. function hapi.ext.prototype.add (event)
    2. function hapi.ext.prototype.merge (others)
    3. function hapi.ext.prototype.subscribe (route)
  16. module hapi.handler
    1. function hapi.handler.configure (handler, route)
    2. function hapi.handler.defaults (method, handler, server)
    3. function hapi.handler.execute (request, next)
    4. function hapi.handler.prerequisitesConfig (config, server)
  17. module hapi.methods
    1. function hapi.methods (server)
    2. object hapi.methods.methodNameRx
  18. module hapi.methods.prototype
    1. function hapi.methods.prototype._add (name, method, options, realm)
    2. function hapi.methods.prototype._assign (name, method, normalized)
    3. function hapi.methods.prototype.add (name, method, options, realm)
  19. module hapi.promises
    1. function hapi.promises.wrap (bind, method, args)
  20. module hapi.protect
    1. function hapi.protect (request)
  21. module hapi.protect.prototype
    1. function hapi.protect.prototype._onError (err)
    2. function hapi.protect.prototype.enter (func)
    3. function hapi.protect.prototype.reset ()
    4. function hapi.protect.prototype.run (next, enter)
  22. module hapi.reply
    1. function hapi.reply ()
  23. module hapi.reply.prototype
    1. function hapi.reply.prototype.decorate (property, method)
    2. function hapi.reply.prototype.interface (request, realm, options, next)
  24. module hapi.request
    1. function hapi.request ()
  25. module hapi.request.prototype
    1. function hapi.request.prototype.decorate (property, method, options)
    2. function hapi.request.prototype.request (connection, req, res, options)
  26. module hapi.response
    1. function hapi.response (source, request, options)
    2. function hapi.response.Payload (payload, options)
    3. function hapi.response.Peek (podium)
    4. function hapi.response.super_ (events)
    5. function hapi.response.unmodified (request, options)
    6. function hapi.response.wrap (result, request)
  27. module hapi.response.prototype
    1. function hapi.response.prototype._close ()
    2. function hapi.response.prototype._header (key, value, options)
    3. function hapi.response.prototype._isPayloadSupported ()
    4. function hapi.response.prototype._isRewritable ()
    5. function hapi.response.prototype._isTemporary ()
    6. function hapi.response.prototype._marshal (next)
    7. function hapi.response.prototype._passThrough ()
    8. function hapi.response.prototype._permanent (isPermanent)
    9. function hapi.response.prototype._prepare (next)
    10. function hapi.response.prototype._processPrepare (next)
    11. function hapi.response.prototype._rewritable (isRewritable)
    12. function hapi.response.prototype._setRewritable (isRewritable)
    13. function hapi.response.prototype._setSource (source, variety)
    14. function hapi.response.prototype._setTemporary (isTemporary)
    15. function hapi.response.prototype._streamify (source, next)
    16. function hapi.response.prototype._tap ()
    17. function hapi.response.prototype._temporary (isTemporary)
    18. function hapi.response.prototype.bytes (bytes)
    19. function hapi.response.prototype.charset (charset)
    20. function hapi.response.prototype.code (statusCode)
    21. function hapi.response.prototype.created (location)
    22. function hapi.response.prototype.encoding (encoding)
    23. function hapi.response.prototype.etag (tag, options)
    24. function hapi.response.prototype.header (key, value, options)
    25. function hapi.response.prototype.location (uri)
    26. function hapi.response.prototype.message (httpMessage)
    27. function hapi.response.prototype.passThrough (enabled)
    28. function hapi.response.prototype.redirect (location)
    29. function hapi.response.prototype.replacer (method)
    30. function hapi.response.prototype.spaces (count)
    31. function hapi.response.prototype.state (name, value, options)
    32. function hapi.response.prototype.suffix (suffix)
    33. function hapi.response.prototype.takeover ()
    34. function hapi.response.prototype.ttl (ttl)
    35. function hapi.response.prototype.type (type)
    36. function hapi.response.prototype.unstate (name, options)
    37. function hapi.response.prototype.vary (value)
  28. module hapi.route
    1. function hapi.route (route, connection, plugin, options)
  29. module hapi.route.prototype
    1. function hapi.route.prototype._combineExtensions (type, subscribe)
    2. function hapi.route.prototype.rebuild (event)
  30. module hapi.schema
    1. function hapi.schema.apply (type, options, message)
  31. module hapi.transmit
    1. function hapi.transmit.send (request, callback)
  32. module hapi.validation
    1. function hapi.validation.compile (rule)
    2. function hapi.validation.headers (request, next)
    3. function hapi.validation.params (request, next)
    4. function hapi.validation.payload (request, next)
    5. function hapi.validation.query (request, next)
    6. function hapi.validation.response (request, next)

module hapi

function hapi.Server (options)

function hapi.Server.super_ (server, connections, env, parent)

function hapi.auth (connection)

function hapi.compression ()

function hapi.connection (server, options)

function hapi.ext (type, server)

function hapi.methods (server)

function hapi.protect (request)

function hapi.reply ()

function hapi.request ()

function hapi.response (source, request, options)

function hapi.route (route, connection, plugin, options)

module hapi.Server

function hapi.Server (options)

function hapi.Server.super_ (server, connections, env, parent)

module hapi.Server.prototype

function hapi.Server.prototype._createCache (options, _callback)

function hapi.Server.prototype._invoke (type, next)

function hapi.Server.prototype._start (callback)

function hapi.Server.prototype._validateDeps ()

function hapi.Server.prototype.connection (options)

function hapi.Server.prototype.initialize (callback)

function hapi.Server.prototype.start (callback)

function hapi.Server.prototype.stop ()

module hapi.Server.super_

function hapi.Server.super_ (events)

module hapi.Server.super_.prototype

function hapi.Server.super_.prototype._apply (type, func, args)

function hapi.Server.super_.prototype._applyChild (type, child, func, args)

function hapi.Server.super_.prototype._clone (connections, plugin)

function hapi.Server.super_.prototype._ext (event)

function hapi.Server.super_.prototype._log (tags, data)

function hapi.Server.super_.prototype._select (labels, plugin)

function hapi.Server.super_.prototype._single ()

function hapi.Server.super_.prototype.bind (context)

function hapi.Server.super_.prototype.cache (options, _segment)

function hapi.Server.super_.prototype.decoder (encoding, decoder)

function hapi.Server.super_.prototype.decorate (type, property, method, options)

function hapi.Server.super_.prototype.dependency (dependencies, after)

function hapi.Server.super_.prototype.emit (criteria, data, callback)

function hapi.Server.super_.prototype.encoder (encoding, encoder)

function hapi.Server.super_.prototype.event (event)

function hapi.Server.super_.prototype.expose (key, value)

function hapi.Server.super_.prototype.ext (events)

function hapi.Server.super_.prototype.handler (name, method)

function hapi.Server.super_.prototype.inject (options, callback)

function hapi.Server.super_.prototype.log (tags, data, timestamp, _internal)

function hapi.Server.super_.prototype.lookup (id)

function hapi.Server.super_.prototype.match (method, path, host)

function hapi.Server.super_.prototype.method (name, method, options)

function hapi.Server.super_.prototype.path (relativeTo)

function hapi.Server.super_.prototype.register (plugins)

function hapi.Server.super_.prototype.route (options)

function hapi.Server.super_.prototype.select ()

function hapi.Server.super_.prototype.state (name, options)

function hapi.Server.super_.prototype.table (host)

module hapi.Server.super_.super_.prototype

function hapi.Server.super_.super_.prototype._emit (criteria, data, generated, callback)

function hapi.Server.super_.super_.prototype.addListener (criteria, listener)

function hapi.Server.super_.super_.prototype.emit (criteria, data, callback)

function hapi.Server.super_.super_.prototype.hasListeners (name)

function hapi.Server.super_.super_.prototype.on (criteria, listener)

function hapi.Server.super_.super_.prototype.once (criteria, listener)

function hapi.Server.super_.super_.prototype.registerEvent (events)

function hapi.Server.super_.super_.prototype.registerPodium (podiums)

function hapi.Server.super_.super_.prototype.removeAllListeners (name)

function hapi.Server.super_.super_.prototype.removeListener (name, listener)

module hapi.auth

function hapi.auth (connection)

function hapi.auth.access (request, route)

function hapi.auth.authenticate (request, next)

function hapi.auth.payload (request, next)

function hapi.auth.response (request, next)

module hapi.auth.prototype

function hapi.auth.prototype._authenticate (request, next)

function hapi.auth.prototype._setupRoute (options, path)

function hapi.auth.prototype.default (options)

function hapi.auth.prototype.lookup (route)

function hapi.auth.prototype.scheme (name, scheme)

function hapi.auth.prototype.strategy (name, scheme)

function hapi.auth.prototype.test (name, request, next)

module hapi.compression

function hapi.compression ()

module hapi.compression.prototype

function hapi.compression.prototype.accept (request)

function hapi.compression.prototype.addDecoder (encoding, decoder)

function hapi.compression.prototype.addEncoder (encoding, encoder)

function hapi.compression.prototype.encoder (request, encoding)

function hapi.compression.prototype.encoding (response)

module hapi.connection

function hapi.connection (server, options)

function hapi.connection.super_ (events)

module hapi.connection.prototype

function hapi.connection.prototype._addRoute (config, plugin)

function hapi.connection.prototype._defaultRoutes ()

function hapi.connection.prototype._dispatch (options)

function hapi.connection.prototype._ext (event)

function hapi.connection.prototype._init ()

function hapi.connection.prototype._route (configs, plugin)

function hapi.connection.prototype._start (callback)

function hapi.connection.prototype._stop (options, callback)

function hapi.connection.prototype.decoder (encoding, decoder)

function hapi.connection.prototype.encoder (encoding, encoder)

function hapi.connection.prototype.inject (options, callback)

function hapi.connection.prototype.lookup (id)

function hapi.connection.prototype.match (method, path, host)

function hapi.connection.prototype.table (host)

module hapi.cors

function hapi.cors.handler (connection)

function hapi.cors.headers (response)

function hapi.cors.matchOrigin (origin, settings)

function hapi.cors.options (route, connection, server)

function hapi.cors.route (options)

module hapi.ext

function hapi.ext (type, server)

module hapi.ext.prototype

function hapi.ext.prototype.add (event)

function hapi.ext.prototype.merge (others)

function hapi.ext.prototype.subscribe (route)

module hapi.handler

function hapi.handler.configure (handler, route)

function hapi.handler.defaults (method, handler, server)

function hapi.handler.execute (request, next)

function hapi.handler.prerequisitesConfig (config, server)

module hapi.methods

function hapi.methods (server)

module hapi.methods.prototype

function hapi.methods.prototype._add (name, method, options, realm)

function hapi.methods.prototype._assign (name, method, normalized)

function hapi.methods.prototype.add (name, method, options, realm)

module hapi.promises

function hapi.promises.wrap (bind, method, args)

module hapi.protect

function hapi.protect (request)

module hapi.protect.prototype

function hapi.protect.prototype._onError (err)

function hapi.protect.prototype.enter (func)

function hapi.protect.prototype.reset ()

function hapi.protect.prototype.run (next, enter)

module hapi.reply

function hapi.reply ()

module hapi.reply.prototype

function hapi.reply.prototype.decorate (property, method)

function hapi.reply.prototype.interface (request, realm, options, next)

module hapi.request

function hapi.request ()

module hapi.request.prototype

function hapi.request.prototype.decorate (property, method, options)

function hapi.request.prototype.request (connection, req, res, options)

module hapi.response

function hapi.response (source, request, options)

function hapi.response.Payload (payload, options)

function hapi.response.Peek (podium)

function hapi.response.super_ (events)

function hapi.response.unmodified (request, options)

function hapi.response.wrap (result, request)

module hapi.response.prototype

function hapi.response.prototype._close ()

function hapi.response.prototype._header (key, value, options)

function hapi.response.prototype._isPayloadSupported ()

function hapi.response.prototype._isRewritable ()

function hapi.response.prototype._isTemporary ()

function hapi.response.prototype._marshal (next)

function hapi.response.prototype._passThrough ()

function hapi.response.prototype._permanent (isPermanent)

function hapi.response.prototype._prepare (next)

function hapi.response.prototype._processPrepare (next)

function hapi.response.prototype._rewritable (isRewritable)

function hapi.response.prototype._setRewritable (isRewritable)

function hapi.response.prototype._setSource (source, variety)

function hapi.response.prototype._setTemporary (isTemporary)

function hapi.response.prototype._streamify (source, next)

function hapi.response.prototype._tap ()

function hapi.response.prototype._temporary (isTemporary)

function hapi.response.prototype.bytes (bytes)

function hapi.response.prototype.charset (charset)

function hapi.response.prototype.code (statusCode)

function hapi.response.prototype.created (location)

function hapi.response.prototype.encoding (encoding)

function hapi.response.prototype.etag (tag, options)

function hapi.response.prototype.header (key, value, options)

function hapi.response.prototype.location (uri)

function hapi.response.prototype.message (httpMessage)

function hapi.response.prototype.passThrough (enabled)

function hapi.response.prototype.redirect (location)

function hapi.response.prototype.replacer (method)

function hapi.response.prototype.spaces (count)

function hapi.response.prototype.state (name, value, options)

function hapi.response.prototype.suffix (suffix)

function hapi.response.prototype.takeover ()

function hapi.response.prototype.ttl (ttl)

function hapi.response.prototype.type (type)

function hapi.response.prototype.unstate (name, options)

function hapi.response.prototype.vary (value)

module hapi.route

function hapi.route (route, connection, plugin, options)

module hapi.route.prototype

function hapi.route.prototype._combineExtensions (type, subscribe)

function hapi.route.prototype.rebuild (event)

module hapi.schema

function hapi.schema.apply (type, options, message)

module hapi.transmit

function hapi.transmit.send (request, callback)

module hapi.validation

function hapi.validation.compile (rule)

function hapi.validation.headers (request, next)

function hapi.validation.params (request, next)

function hapi.validation.payload (request, next)

function hapi.validation.query (request, next)

function hapi.validation.response (request, next)

[ this document was created with utility2 ]