• Create a response with a TXT file response. It receives a string with the TXT content and set the Content-Type header to text/plain; charset=utf-8 always.

    This is useful to dynamically create a TXT file from a Resource Route.

    Parameters

    • content: string
    • init: number | ResponseInit = {}

    Returns Response

    export let loader: LoaderFunction = async ({ request }) => {
    return txt(`
    User-agent: *
    Allow: /
    `);
    }