TsgcSSEClient › Properties › Headers
Extra HTTP request headers sent with every connection attempt, one Name: Value pair per line.
property Headers: TStringList read FHeaders write SetHeaders;
empty
Every line must have the form Name: Value. The headers are added to the GET request of every connection attempt, including the automatic reconnections, so they are the right place for a bearer token or an API key. The client already sends Accept: text/event-stream and, when a last event id is known, Last-Event-ID, so those two do not need to be added here. For settings that are not plain headers, such as TLS, proxy or basic authentication, use the OnBeforeConnect event.
oSSE.Headers.Clear;
oSSE.Headers.Add('Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...');
oSSE.Headers.Add('X-Client: sgcWebSockets');
oSSE.Open;