spring-framework / org.springframework.web.client

Package org.springframework.web.client

Functions

exchange

fun <T : Any> RestOperations.exchange(url: String, method: HttpMethod, requestEntity: HttpEntity<*>? = null, vararg uriVariables: Any): ResponseEntity<T>
fun <T : Any> RestOperations.exchange(url: String, method: HttpMethod, requestEntity: HttpEntity<*>? = null, uriVariables: Map<String, *>): ResponseEntity<T>
fun <T : Any> RestOperations.exchange(url: URI, method: HttpMethod, requestEntity: HttpEntity<*>? = null): ResponseEntity<T>
fun <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.

getForEntity

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

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.

getForObject

fun <T : Any> RestOperations.getForObject(url: String, vararg uriVariables: Any): T?
fun <T : Any> RestOperations.getForObject(url: String, uriVariables: Map<String, Any?>): T?
fun <T : Any> 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.

patchForObject

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

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.

postForEntity

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

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.

postForObject

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

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.