When kotlin+dropwizard make it this easy ``` @...
# announcements
j
When kotlin+dropwizard make it this easy
Copy code
@GET
    @Timed
    @Produces("image/png")
    fun generateQR(): Response {
        val code = QRCode
            .from("<http://www.google.com>")
            .withSize(200,200)
            .to(ImageType.PNG)
            .stream()

        val stream = StreamingOutput {
            code.writeTo(it)
        }
        return Response.ok(stream).build()
    }