resolve

abstract fun resolve(path: String): ServerAsset?

Resolve the provided path to a server asset, if possible, or return null to indicate that the asset could not be located; the given path value can be prefixed with the asset serving prefix (/_/asset by default) or not prefixed at all.

Note: Only asset tags should be used to serve resources at runtime in production circumstances.

Return

Resolved server asset, or null, indicating that the asset could not be located.

Parameters

path

Path for the asset which we should resolve.


open fun resolve(request: HttpRequest<*>): ServerAsset?

Resolve the provided HTTP request to an asset path string, and then resolve the asset path string to a loaded ServerAsset, if possible; return null if the asset cannot be located.

Return

Resolved server-held asset, or null to indicate that the asset could not be located.

Parameters

request

HTTP request for the asset which we should resolve.