Function get

  • Fetches text (typically markup) from the url. This is only a shorthand for using fetch.

    Parameters

    • url: string

      The url to pass to fetch

    • Optional suppressErrors: boolean

      Whether to return the empty string if an error occurs.

    • Optional init: RequestInit

      The init argument for fetch

    Returns Promise<string>

    Example

    import { get } from 'deleight/apriori';
    const markup = await get('./something.html')