File download from a REST API with Spring Boot
When calling a REST endpoint the response is generally returned as JSON. What if we want to give the user the chance to download the same data as a file? We can build an endpoint that returns data as a downloadable file. The following example shows how easy it is to create an endpoint to download a file with Spring. The project We’ll build a Spring Boot project with spring-boot-starter-web as the only required dependency, […]