Is there any example for download file from http4k...
# http4k
k
Is there any example for download file from http4k server?
I tried and sucess
Copy code
"/materialDownload" meta {
    summary = "download material by id"
    queries += Query.long().required("id")
    returning(
        Status.OK,
    )
} bindContract Method.GET to { req ->
    val m = ByteArray(100)
    val fName = URLEncoder.encode("filename.txt", Charsets.UTF_8)
    Response(Status.OK)
        .header("Content-Disposition", "attachment; filename=$fName")
        .body(m.inputStream())
}