head

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

Defines a stub for an HTTP HEAD 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 used to deserialise the request payload (typically unused for HEAD).

block

Lambda to configure the request specification.


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

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

Return

A BuildingStep for further stub setup.

Parameters

configuration

Stub configuration (name, removal behaviour, verbosity).

requestType

The class used to deserialise the request payload (typically unused for HEAD).

block

Lambda to configure the request specification.


Defines a stub for an HTTP HEAD request with a string request body.

Return

A building step for further customization of the HEAD request stub.

Parameters

block

Lambda to configure the request specification builder.