messages
fun messages(name: String? = null, block: Consumer<AnthropicMessagesRequestSpecification>): AnthropicBuildingStep(source)
Java-friendly overload that accepts a Consumer for configuring the chat request.
Return
An AnthropicBuildingStep for configuring the mock response.
Parameters
name
Optional identifier for the mock endpoint.
block
Configuration block for defining request matching rules via AnthropicMessagesRequestSpecification.
fun messages(name: String? = null, block: AnthropicMessagesRequestSpecification.() -> Unit): AnthropicBuildingStep(source)
Sets up a mock handler for the Anthropic /v1/messages endpoint.
Return
An AnthropicBuildingStep for configuring the mock response.
Parameters
name
Optional identifier for the mock endpoint.
block
Configuration block for defining request matching rules via AnthropicMessagesRequestSpecification.