Kotlin – RestTemplateClient Send/Recieve Base64 File/Image to SpringBoot server
In the tutorial, we guide how to post/get base64 files/images by RestTemplateClient to SpringBoot server with Kotlin language.
I. Technologies
– Java 1.8
– Kotlin 1.2.20
– Spring Tool Suite – Version 3.9.2.RELEASE
– Spring Boot – 1.5.10.RELEASE
– Apache Maven 3.5.2
II. Goal
We create 2 Kotlin SpringBoot projects {KotlinRestfulAPIs, KotlinRestTemplateClient} as below:
KotlinRestfulAPIs project provides 2 RestAPIs:
@PostMapping(value = "/post")
fun post(@RequestBody image: ImageData): String
...
@GetMapping(value = "/get")
fun get(@RequestParam("name") name: String): ImageData
...
More at:
Top comments (0)