Module: models/responseResolver

Determines the response for a stub based on the user-provided response configuration

Source:

Methods

resolve(responseConfig, request, logger, stubs, imposterState) → {Object}

Resolves a single response

Parameters:
Name Type Description
responseConfig Object

The API-provided response configuration

request Object

The protocol-specific request object

logger Object

The logger

stubs Object

The stubs for the imposter

imposterState Object

The current state for the imposter

Source:
Returns:
  • Promise resolving to the response
Type
Object

(inner) create(proxy, postProcess) → {Object}

Creates the resolver

Parameters:
Name Type Description
proxy Object

The protocol-specific proxy implementation

postProcess function

The protocol-specific post-processor to add default response values

Source:
Returns:
Type
Object