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

getForObject

fun <reified T> RestOperations.getForObject(url: String, vararg uriVariables: Any): T
fun <reified T> RestOperations.getForObject(url: String, uriVariables: Map<String, Any?>): T
fun <reified T> RestOperations.getForObject(url: URI): T

Extension for RestOperations.getForObject providing a getForObject<Foo>(...) variant leveraging Kotlin reified type parameters. Like the original Java method, this extension is subject to type erasure. Use exchange if you need to retain actual generic type arguments.

Author
Jon Schneider

Author
Sebastien Deleuze

Since
5.0