send

fun send(method: Method, uri: URI, inputHeaders: Map<String, List<String>>, inputBodyContentType: MediaType?, inputBody: ByteArray?, outputs: List<Output<*, *>>): ResponseEntity<ByteArray>(source)

Sends a request to the configured client and validates the response against the expected outputs.

Return

the received ResponseEntity.

Parameters

method

HTTP method to invoke.

uri

fully resolved request URI.

inputHeaders

header values to send with the request.

inputBodyContentType

optional request body media type.

inputBody

optional request body payload.

outputs

collection of expected output definitions for status matching.

See also

RestClient

Throws

RestClientResponseException

when the response does not satisfy status or content-type expectations.