MockRule

data class MockRule(val id: String, val priority: Int, val method: String? = null, val scheme: String? = null, val host: String? = null, val path: String = ".*", val queryPredicates: Map<String, String> = emptyMap(), val headerPredicates: Map<String, String> = emptyMap(), val bodyPredicate: String? = null, val scope: MockScope = MockScope.SESSION, val action: MockAction = MockAction.Passthrough, val sourceBodySnapshot: String? = null)

Constructors

Link copied to clipboard
constructor(id: String, priority: Int, method: String? = null, scheme: String? = null, host: String? = null, path: String = ".*", queryPredicates: Map<String, String> = emptyMap(), headerPredicates: Map<String, String> = emptyMap(), bodyPredicate: String? = null, scope: MockScope = MockScope.SESSION, action: MockAction = MockAction.Passthrough, sourceBodySnapshot: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val host: String?
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The original transaction's response body, captured only by the "mock this response" flows (Compose and the web dashboard) so the served mock can later be diffed against it. Session-only: it is never written to any disk persistence of rules -- toDurableRules strips it before a rule reaches a MockRuleStore, and hand-written rules never set it in the first place.

Functions

Link copied to clipboard