Sign in Join
FPDoc Onlineexperiment

TFPCustomHTTPClient.GetEventSource function

Member of TFPCustomHTTPClientpublicIn unit fpHTTPClient

Creates a Server-Sent Events connection

Declaration

pascal
function GetEventSource(const aMethod: string; const aURL: string; 
                       const aBody: string='') : TCustomHTTPEventSource

Arguments

aMethod

The HTTP method to use (typically GET)

aURL

The URL of the Server-Sent Events endpoint

aBody

Optional request body data

Function result

The Server-Sent Events source for reading events

Description

Establishes a Server-Sent Events connection to the specified URL and returns an event source for reading events. The connection uses the specified HTTP method and optional request body.

Errors

May raise HTTP-related exceptions on connection errors.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.