patch

fun <P : Any> patch(name: String? = null, requestType: KClass<P>, block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)

Defines a stub for an HTTP PATCH request with the specified request type and configuration block.

Return

A building step for further stub customization.

Parameters

name

Optional name for the stub.

requestType

The class of the request payload.

block

Lambda to configure the request specification.


fun <P : Any> patch(configuration: StubConfiguration, requestType: KClass<P>, block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)

Registers a stub for an HTTP PATCH request with the specified configuration and request type.

Return

A BuildingStep for further configuring the PATCH request stub.

Parameters

configuration

Stub configuration (name, removal behaviour, verbosity).

requestType

The class of the expected request payload.

block

Lambda to configure the RequestSpecificationBuilder.


Defines a PATCH request stub with a string request body using the provided configuration block.

Return

A BuildingStep for further customization of the PATCH request stub.

Parameters

block

Lambda to configure the request specification builder for the PATCH request.