• Subscribe to an event source and return the latest event.

    Parameters

    • url: string | URL

      The URL of the event source to connect to

    • options: EventSourceOptions = {}

      The options to pass to the EventSource constructor

    Returns null | string

    The last event received from the server