Builder

class Builder(key: String)

Parameters

key

An identifier for this endpoint. Endpoints cannot share an id.

Constructors

Link copied to clipboard
constructor(key: String)

Functions

Link copied to clipboard

Completes the builder - returns the configuration.

Link copied to clipboard

Configure the presets that are available to users of the dashboard.

Link copied to clipboard

The block called when a network request is made to this endpoint. Note: If the value of setShouldFail causes Mockzilla to generate a failure response, then this block will not be called, instead the block specified by setErrorHandler is called.

Link copied to clipboard

No longer supported

Link copied to clipboard

The block called when a network request is made to this endpoint but Mockzilladecides to simulate a server failure.

Link copied to clipboard

Probability of Mockzilla returning a simulated http error for this endpoint. 100 being a guaranteed error .

Link copied to clipboard

Used to simulate latency: The artificial mean delay Mockzilla with add to a network request. Used alongside setMeanDelayMillis to calculate the actual artificial delay on each invocation.

Link copied to clipboard

Sets the human readable name of the endpoint (defaults to the value of the key)

Link copied to clipboard

Specifies whether Mockzilla should map a network request to this endpoint.

Link copied to clipboard

Specifies whether Mockzilla should map a network request to this endpoint.

Link copied to clipboard

Controls whether calls to this endpoint should fail by default

Link copied to clipboard

Sets the version this endpoint is currently set to. A change in the version code will automatically clear any caches on the device associated with this endpoint.

Link copied to clipboard

The response which is prefilled in the Mockzilla web page.

Link copied to clipboard

The error response which is prefilled in the Mockzilla web page.