post
fun <P : Any> post(name: String? = null, requestType: KClass<P>, block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)
Defines a stub for an HTTP POST request with the specified request type and configuration block.
Return
A BuildingStep for further stub customization.
Parameters
name
Optional name for the stub.
request Type
The class of the request body to match.
block
Lambda to configure the request specification.
fun <P : Any> post(configuration: StubConfiguration, requestType: KClass<P>, block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)
Defines a POST request stub with the specified configuration and request type.
Return
A BuildingStep for further stub setup or response definition.
Parameters
configuration
Stub configuration (name, removal behaviour, verbosity).
request Type
The class of the expected request body.
block
Lambda to configure the request specification details.
Defines a stub for an HTTP POST request with a string request body.
Return
A building step for further customization of the POST request stub.
Parameters
block
Lambda to configure the request specification builder.