put

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

Configures an HTTP PUT request specification using the provided block and returns a BuildingStep instance for further customization. This method uses the HTTP PUT 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

block

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


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

Executes an HTTP PUT request with the provided configuration and request specifications.

Return

A BuildingStep instance for further processing of the request.

Parameters

configuration

The stub configuration to be used for the request.

requestType

The class type of the request payload.

block

A configuration block to build the request specifications.


Configures an HTTP PUT 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.