options

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

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


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

Configures and executes an HTTP OPTIONS request based on the given parameters.

Return

A BuildingStep object representing the state after configuring the OPTIONS request.

Parameters

configuration

The configuration settings to use for the request.

requestType

The class type of the request body.

block

A lambda to build and modify the request specifications.


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