Module: models/responseResolver

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

Source:

Methods

resolve(responseConfig, request, logger, imposterState, options) → {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

imposterState Object

The current state for the imposter

options Object

Additional options not carried with the request

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

(inner) create(stubs, proxy, callbackURL) → {Object}

Creates the resolver

Parameters:
Name Type Description
stubs Object

The stubs repository

proxy Object

The protocol-specific proxy implementation

callbackURL String

The protocol callback URL for response resolution

Source:
Returns:
Type
Object