resolveResource

fun ApplicationCall.resolveResource(path: String, resourcePackage: String? = null, classLoader: ClassLoader = application.environment.classLoader, mimeResolve: (String) -> ContentType = { ContentType.defaultForFileExtension(it) }): OutgoingContent.ReadChannelContent?

Return

LocalFileContent or JarFileContent or null

Parameters

path

is a relative path to the resource

resourcePackage

is a base package the path to be appended to

mimeResolve

is a function that resolves content type by file extension, optional