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)

The function responding to GET /imposters

Parameters:
Name Type Description
request Object

the HTTP request

response Object

the HTTP response

Source:

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, Imposter, logger) → {Object}

Creates the imposters controller

Parameters:
Name Type Description
protocols Object

the protocol implementations supported by mountebank

imposters Object

The map of ports to imposters

Imposter Object

The factory for creating new imposters

logger Object

The logger

Source:
Returns:
Type
Object