options

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

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

Return

A BuildingStep for further customization of the stub.

Parameters

name

Optional name for the stub.

requestType

The class of the request payload.

block

Lambda to configure the request specification.


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

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

Return

A BuildingStep for further stub setup or response definition.

Parameters

configuration

Stub configuration settings for this request.

requestType

The class representing the expected request body type.

block

Lambda to configure the request specification.


Defines an HTTP OPTIONS request stub with a string request body using the provided configuration block.

Return

A BuildingStep for further customization of the stub.

Parameters

block

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