BuildingStep

Defines the building step for associating an inbound RequestSpecification with its corresponding response definition. This class is part of a fluent API used to define mappings between request specifications and their respective responses.

Author

Konstantin Pavlov

Parameters

P

The type of the request payload.

Functions

Link copied to clipboard
infix fun <T : Any> respondsWith(block: suspend ResponseDefinitionBuilder<P, T>.() -> Unit)

Associates the current RequestSpecification with a response definition. This method is part of a fluent API for defining mappings between requests and responses.

fun <T : Any> respondsWith(responseType: KClass<T>, block: suspend ResponseDefinitionBuilder<P, T>.() -> Unit)

Associates the current RequestSpecification with a response definition.

Link copied to clipboard
fun <P : Any, T : Any> BuildingStep<P>.respondsWith(responseType: Class<T>, configurer: Consumer<ResponseDefinitionBuilder<P, T>>)

Java-friendly overload for BuildingStep.respondsWith.

Link copied to clipboard

Associates the current RequestSpecification with a server-sent events (SSE) streaming response definition. This method is part of a fluent API for defining mappings between requests and SSE streaming responses.

Associates the current RequestSpecification with an SSE streaming response definition.

Link copied to clipboard
infix fun <T : Any> respondsWithStream(block: suspend StreamingResponseDefinitionBuilder<P, T>.() -> Unit)

Associates the current RequestSpecification with a streaming response definition. This method is part of a fluent API for defining mappings between requests and streaming responses.

fun <T : Any> respondsWithStream(responseType: KClass<T>, block: suspend StreamingResponseDefinitionBuilder<P, T>.() -> Unit)

Associates the current RequestSpecification with a streaming response definition.

Link copied to clipboard

Java-friendly overload for BuildingStep.respondsWithStream.