spring-framework / org.springframework.test.web.reactive.server / HttpHandlerConnector

HttpHandlerConnector

open class HttpHandlerConnector : ClientHttpConnector

Connector that handles requests by invoking an HttpHandler rather than making actual requests to a network socket.

Internally the connector uses and adapts MockClientHttpRequest and MockClientHttpResponse to MockServerHttpRequest and MockServerHttpResponse.

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

HttpHandlerConnector(handler: HttpHandler)

Constructor with the HttpHandler to handle requests with.

Functions

connect

open fun connect(httpMethod: HttpMethod, uri: URI, requestCallback: Function<in ClientHttpRequest, Mono<Void>>): Mono<ClientHttpResponse>