Sign in Join
FPDoc Onlineexperiment

TFPCustomHTTPClient class

In unit fpHTTPClient

Base HTTP client class for making HTTP requests

Declaration

pascal
TFPCustomHTTPClient = class(TComponent)

Inheritance

  1. TFPCustomHTTPClient
  2. TComponent
  3. TPersistent
  4. TObject

Descends from it: TFPHTTPClient

Description

TFPCustomHTTPClient is the base class for HTTP client functionality. It provides methods for all standard HTTP operations including GET, POST, PUT, DELETE, PATCH, OPTIONS, and HEAD requests.

The class supports SSL/TLS connections, HTTP redirects, authentication, cookies, form posting with file uploads, proxy connections, and Server-Sent Events. It handles connection management, timeout control, and provides various events for monitoring request progress.

See also

Properties

UnixSocketPathpublicPath to Unix domain socket for local connections
TerminatedpublicIndicates whether the HTTP operation has been terminated
Socketprotected
IOTimeoutprotected
ConnectTimeoutprotected
RequestHeadersprotected
RequestCookiesprotected
ResponseCookiesprotected
Cookiesprotected
RequestBodyprotected
HTTPversionprotected
ResponseHeadersprotected
ServerHTTPVersionprotected
ResponseStatusCodeprotected
ResponseStatusTextprotected
AllowRedirectprotected
MaxRedirectsprotected
MaxChunkSizeprotected
Proxyprotected
UserNameprotected
Passwordprotected
Connectedprotected
KeepConnectionprotected
KeepConnectionReconnectLimitprotected
VerifySSLCertificateprotected
CertCAFileNameprotected
TrustedCertsDirprotected
AfterSocketHandlerCreateprotected
MaxHeaderLineLengthprotected
MaxHeaderCountprotected
MaxResponseSizeprotected

Methods

CheckHeaderprotected
CreateEventSourceprotected
StartEventStreamprotected
HandlesEventstreamprotected
DoVerifyCertificateprotected
NoContentAllowedprotected
DoNormalRequestprotected
DoKeepConnectionRequestprotected
IsConnectedprotected
ProxyActiveprotected
CreateProxyDataprotected
DoDataReadprotected
DoDataWriteprotected
ParseStatusLineprotected
GetServerURLprotected
ProtocolSupportedprotected
ReadFromSocketprotected
WriteToSocketprotected
ReadStringprotected
WriteStringprotected
WriteRequestBodyprotected
CheckResponseCodeprotected
ReadResponseprotected
ReadResponseHeadersprotected
AllowHeaderprotected
HasConnectionCloseprotected
ConnectToServerprotected
ReconnectToServerprotected
DisconnectFromServerprotected
DoMethodprotected
SendRequestprotected
GetSocketHandlerprotected
ExtractSocketprotected
ExtractBufferprotected
SimpleQuoteprotected
CreatepublicCreates a new HTTP client instance
DestroypublicDestroys the HTTP client instance
AddHeaderpublicAdds an HTTP header to a headers collection
IndexOfHeaderpublicReturns the index of a header in a headers collection
GetHeaderpublicGets the value of a header from a headers collection
TerminatepublicTerminates any ongoing HTTP operation
HTTPMethodpublicExecutes an HTTP request with the specified method
GetpublicPerforms an HTTP GET request
GetEventSourcepublicCreates a Server-Sent Events connection
IsRedirectpublicChecks if an HTTP status code indicates a redirect
RedirectForcesGETpublicChecks if a redirect status code forces GET method
SimpleGetpublicStatic method to perform a simple HTTP GET request
PostpublicPerforms an HTTP POST request
SimplePostpublicStatic method to perform a simple HTTP POST request
PutpublicPerforms an HTTP PUT request
SimplePutpublicStatic method to perform a simple HTTP PUT request
DeletepublicPerforms an HTTP DELETE request
SimpleDeletepublicStatic method to perform a simple HTTP DELETE request
PatchpublicPerforms an HTTP PATCH request
SimplePatchpublicStatic method to perform a simple HTTP PATCH request
OptionspublicPerforms an HTTP OPTIONS request
SimpleOptionspublicStatic method to perform a simple HTTP OPTIONS request
HeadpublicPerforms an HTTP HEAD request
FormPostpublicPerforms an HTTP POST request with form data
SimpleFormPostpublicStatic method to perform a simple form POST request
FileFormPostpublicPerforms an HTTP POST request with file upload
StreamFormPostpublicPerforms an HTTP form POST with stream upload
SimpleFileFormPostpublicStatic method to perform a simple file upload form POST

Events

OnRedirectprotected
OnPasswordprotected
OnDataReceivedprotected
OnDataSentprotected
OnHeadersprotected
OnGetSocketHandlerprotected
OnVerifySSLCertificateprotected
OnEventStreamprotected

Inherited

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

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