vueuse / vueuse

Collection of essential Vue Composition Utilities for Vue 2 and 3

Home Page:https://vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`useEventSource` is missing header configuration

quando1910 opened this issue · comments

Clear and concise description of the problem

As a developer using useEventSource, I want to have headers options for useEventSource, so that we can add an Authorization token for the event source in some cases.###

Suggested solution

Add headers?: { [name: string]: string }; in interface EventSourceInit
Then pass headers when execute new EventSource

Alternative

No response

Additional context

No response

Validations

why completed it?

=========

use @microsoft/fetch-event-source / fetch when need add header.
https://blackbing.medium.com/淺談-server-sent-events-9c81ef21ca8e