Docly Developers
Function Updated 23 Oct 2026

setMime(mime)

Allows user to set the mime type of a response.

Parameters

mimestringrequired

Mime type to return

Returns

An empty string — so it writes nothing when used inside #...# — and sets the Content-Type of the response.

Example

Mixed HTML (or any text file) with inline JavaScript between hash signs.
#{
    docly.setMime("text/css");
    write(include("assets/style/file1.css"));
    write(include("assets/style/file2.css"));
}#