jkbbwr
09/24/2016, 1:05 PM@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()
}