spring-framework / org.springframework.web.client / exchange

exchange

inline fun <reified T : Any> RestOperations.exchange(url: String, method: HttpMethod, requestEntity: HttpEntity<*>? = null, vararg uriVariables: Any): ResponseEntity<T>
inline fun <reified T : Any> RestOperations.exchange(url: String, method: HttpMethod, requestEntity: HttpEntity<*>? = null, uriVariables: Map<String, *>): ResponseEntity<T>
inline fun <reified T : Any> RestOperations.exchange(url: URI, method: HttpMethod, requestEntity: HttpEntity<*>? = null): ResponseEntity<T>
inline fun <reified T : Any> RestOperations.exchange(requestEntity: RequestEntity<*>): ResponseEntity<T>

Extension for RestOperations.exchange providing an exchange<Foo>(...) variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

Author
Jon Schneider

Author
Sebastien Deleuze

Since
5.0