method
inline fun <P : Any> MokksyServer.method(configuration: StubConfiguration, httpMethod: HttpMethod, noinline block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)
Reified shortcut for MokksyServer.method with a StubConfiguration. Infers P from the call site.
Return
A BuildingStep for response configuration and stub registration.
Parameters
configuration
The StubConfiguration controlling stub behaviour (name, priority, etc.).
http Method
The HTTP method to match.
block
Lambda to configure the RequestSpecificationBuilder.
Type Parameters
P
The expected type of the request body.
inline fun <P : Any> MokksyServer.method(name: String? = null, httpMethod: HttpMethod, noinline block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)
Reified shortcut for MokksyServer.method with an optional stub name. Infers P from the call site.
Return
A BuildingStep for response configuration and stub registration.
Parameters
name
Optional identifier for this stub.
http Method
The HTTP method to match.
block
Lambda to configure the RequestSpecificationBuilder.
Type Parameters
P
The expected type of the request body.