EndpointConfiguration
Configures a single mock endpoint within a Mockzilla server. Defines how incoming requests are matched to this endpoint and what response to return, along with optional dashboard presets and latency simulation.
Construct via Builder.
Constructors
Types
Unique serializable identifier for an EndpointConfiguration. Used to reference endpoints in management API operations such as cache clearing or runtime overrides.
Properties
Preset responses available to users in the management dashboard.
Called when a request matches this endpoint and shouldFail is false. Returns the mock response to send back to the caller.
Artificial response delay in milliseconds. null falls back to the global delay set on MockzillaConfig.Builder.
Predicate that determines whether an incoming request should be routed to this endpoint. The first matching endpoint wins.
Called when a request matches this endpoint and shouldFail is true. Returns the simulated error response to send back to the caller.
Unique identifier for this endpoint, used in management API operations.
Whether this endpoint returns an error response by default. When true, errorHandler is called instead of defaultHandler.
Version number for this endpoint's configuration. Incrementing this value automatically invalidates any cached responses on connected devices.