Module: controllers/impostersController

The controller that manages the list of imposters

Source:

Methods

del(request, response) → {Object}

The function responding to DELETE /imposters

Parameters:
Name Type Description
request Object

the HTTP request

response Object

the HTTP response

Source:
Returns:

A promise for testing purposes

Type
Object

get(request, response) → {Object}

The function responding to GET /imposters

Parameters:
Name Type Description
request Object

the HTTP request

response Object

the HTTP response

Source:
Returns:
  • the promise
Type
Object

post(request, response) → {Object}

The function responding to POST /imposters

Parameters:
Name Type Description
request Object

the HTTP request

response Object

the HTTP response

Source:
Returns:

A promise for testing purposes

Type
Object

put(request, response) → {Object}

The function responding to PUT /imposters

Parameters:
Name Type Description
request Object

the HTTP request

response Object

the HTTP response

Source:
Returns:

A promise for testing purposes

Type
Object

(inner) create(protocols, imposters, logger, allowInjection) → {Object}

Creates the imposters controller

Parameters:
Name Type Description
protocols Object

the protocol implementations supported by mountebank

imposters Object

The imposters repository

logger Object

The logger

allowInjection Boolean

Whether injection is allowed or not

Source:
Returns:
Type
Object