spring-framework / org.springframework.test.web.client / ResponseCreator

ResponseCreator

@FunctionalInterface interface ResponseCreator

A contract for creating a ClientHttpResponse. Implementations can be obtained via MockRestResponseCreators.

Author
Craig Walls

Since
3.2

Functions

createResponse

abstract fun createResponse(request: ClientHttpRequest): ClientHttpResponse

Create a response for the given request.

Inheritors

RequestExpectation

interface RequestExpectation : ResponseActions, RequestMatcher, ResponseCreator

An extension of ResponseActions that also implements RequestMatcher and ResponseCreator

While ResponseActions is the API for defining expectations this sub-interface is the internal SPI for matching these expectations to actual requests and for creating responses.