spring-framework / org.springframework.web.client

Package org.springframework.web.client

Functions

exchange

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.

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

getForEntity

Extension for RestOperations.getForEntity providing a getForEntity<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.

fun <T> RestOperations.getForEntity(url: URI): ResponseEntity<T>
fun <T> RestOperations.getForEntity(url: String, vararg uriVariables: Any): ResponseEntity<T>
fun <T> RestOperations.getForEntity(url: String, uriVariables: Map<String, *>): ResponseEntity<T>

getForObject

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.

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

patchForObject

Extension for RestOperations.patchForObject providing a patchForObject<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.

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

postForEntity

Extension for RestOperations.postForEntity providing a postForEntity<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.

fun <T> RestOperations.postForEntity(url: String, request: Any? = null, vararg uriVariables: Any): ResponseEntity<T>
fun <T> RestOperations.postForEntity(url: String, request: Any? = null, uriVariables: Map<String, *>): ResponseEntity<T>
fun <T> RestOperations.postForEntity(url: URI, request: Any? = null): ResponseEntity<T>

postForObject

Extension for RestOperations.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.

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