Class: Interaction

Interaction

new Interaction()

Creates a new Interaction.
Source:

Methods

given(providerState) → {Interaction}

Gives a state the provider should be in for this interaction.
Parameters:
Name Type Description
providerState string The state of the provider.
Source:
Returns:
Type
Interaction

json() → {Object}

Returns the interaction object created.
Source:
Returns:
Type
Object

uponReceiving(description) → {Interaction}

A free style description of the interaction.
Parameters:
Name Type Description
description string A description of the interaction.
Source:
Returns:
Type
Interaction

willRespondWith(status, headers, body)

The response expected by the consumer.
Parameters:
Name Type Description
status string The HTTP status
headers string
body string
Source:

withRequest(method, path, queryString, headers, body) → {Interaction}

The request that represents this interaction triggered by the consumer.
Parameters:
Name Type Description
method string The HTTP method
path string The path of the URL
queryString string
headers string
body string
Source:
Returns:
Type
Interaction