patch

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

Configures an HTTP PATCH request specification using the provided block and returns a BuildingStep instance for further customization. This method uses the HTTP PATCH method to define the request specification within the provided lambda.

Return

A BuildingStep instance initialized with the generated request specification.

Parameters

P

type of the request payload.

requestType

The class type of the request body.

block

A lambda used to configure the RequestSpecificationBuilder for the PATCH request.


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

Builds and returns a BuildingStep for a PATCH HTTP request with the provided configuration, request type, and custom request specification block.

Return

A BuildingStep instance representing the constructed PATCH request.

Parameters

configuration

The stub configuration that contains the setup details for the request.

requestType

The KClass type of the request body.

block

A lambda block to define the request specification.


Configures an HTTP PATCH request specification using the provided block and returns a BuildingStep for further customization. This method serves as a convenience shortcut.

Return

A BuildingStep instance initialized with the generated request specification.

Parameters

block

A lambda used to configure the RequestSpecificationBuilder for the GET request.