Show:

Q.Dispatcher Class

Used to dispatch request to the appropriate handler

Constructor

Q.Dispatcher

(
  • server
  • [options={}]
)

Parameters:

  • server Object

    The server object

  • [options={}] Object optional

    Options

Item Index

Methods

Methods

listen

(
  • [options={}]
)
Object

Start external server

Parameters:

  • [options={}] Object optional

Returns:

Object:

The server object

route

(
  • url
)
Object

Route the request

Parameters:

Returns:

Object:

Object containint the requested "module" and "action"

Events

delete

Http DELETE request

Event Payload:

  • info Object

    The object containing request, response and url

options

Http OPTIONS request

Event Payload:

  • info Object

    The object containing request, response and url

post

Http POST request

Event Payload:

  • info Object

    The object containing request, response and url

put

Http PUT request

Event Payload:

  • info Object

    The object containing request, response and url

response

Http response

Event Payload:

  • info Object

    The object containing request, response and url

validate

Http request validation

Event Payload:

  • info Object

    The object containing request, response and url