Function text

  • Fetches the text file at the specified input URL and returns it as a Promise of a string.

    If init is specified, it is passed along to the underlying call to fetch.

    Parameters

    • url: string

      A valid URL string.

    • Optional init: RequestInit

      An optional request initialization object.

    Returns Promise<string>