Sign in Join
FPDoc Onlineexperiment

TFPCustomHTTPClient.SimpleGet procedure

Member of TFPCustomHTTPClientpublicIn unit fpHTTPClient

Static method to perform a simple HTTP GET request

Declaration

pascal
class procedure SimpleGet(const AURL: string; Stream: TStream)
class procedure SimpleGet(const AURL: string; 
 const LocalFileName: string)
class procedure SimpleGet(const AURL: string; Response: TStrings)
class function SimpleGet(const AURL: string): RawByteString

Arguments

AURL

The URL to retrieve

Stream

Stream to write the response content to

LocalFileName

Local filename to save the response to

Response

Variable to store the response content as string

Function result

The response content as string

Description

Static utility method for performing a simple HTTP GET request without requiring an HTTP client instance. This is convenient for quick one-off requests.

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.