postForObject

inline fun <T : Any> TestRestTemplate.postForObject(url: String, request: Any? = null, vararg uriVariables: Any): T?
inline fun <T : Any> TestRestTemplate.postForObject(url: String, request: Any? = null, uriVariables: Map<String, *>): T?
inline fun <T : Any> TestRestTemplate.postForObject(url: URI, request: Any? = null): T?

Extension for TestRestTemplate.postForObject providing a postForObject<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

Sebastien Deleuze

Since

2.0.0