get

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

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

Return

A BuildingStep for further customization and response definition.

Parameters

configuration

Stub configuration (name, removal behaviour, verbosity).

requestType

The class representing the expected request body type.

block

Lambda to configure the RequestSpecificationBuilder for the GET request.


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

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

Return

A BuildingStep for further stub customization.

Parameters

name

Optional name for the stub, used for identification.

requestType

The class of the expected request body.

block

Lambda to configure the RequestSpecificationBuilder.


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

Returns a BuildingStep for further customization of the stubbed GET request.


Defines a stub for an HTTP GET request with the specified configuration and request specification builder.

Return

A BuildingStep for further customization of the stub.

Parameters

configuration

The stub configuration for this GET request.

block

Lambda to configure the request specification builder.