Unit 'fpHTTPClient' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPCustomHTTPClient.GetEventSource

Creates a Server-Sent Events connection

Declaration

Source position: fphttpclient.pp line 281

public function TFPCustomHTTPClient.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

TCustomHTTPEventSource

  

Base class for Server-Sent Events (SSE) client

TFPHTTPClient.OnEventStream

  

Event called when a Server-Sent Events stream is established


Documentation generated on: Jan 27 2026