staticFile

fun staticFile(file: String, contentType: String): HttpResponse<*>

Serve a static file which is embedded in the application JAR, at the path /static/[file].

Return

HTTP response wrapping the desired asset, or an HTTP response which serves a 404 if the asset could not be located at the specified path.

Parameters

file

Filename to load from the /static root directory.

contentType

Content-Type value to send back for this file.