TFPCustomHTTPClient class
Base HTTP client class for making HTTP requests
Declaration
TFPCustomHTTPClient = class(TComponent)Inheritance
- TFPCustomHTTPClient
- TComponent
- TPersistent
- 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
UnixSocketPath | public | Path to Unix domain socket for local connections |
Terminated | public | Indicates whether the HTTP operation has been terminated |
Socket | protected | |
IOTimeout | protected | |
ConnectTimeout | protected | |
RequestHeaders | protected | |
RequestCookies | protected | |
ResponseCookies | protected | |
Cookies | protected | |
RequestBody | protected | |
HTTPversion | protected | |
ResponseHeaders | protected | |
ServerHTTPVersion | protected | |
ResponseStatusCode | protected | |
ResponseStatusText | protected | |
AllowRedirect | protected | |
MaxRedirects | protected | |
MaxChunkSize | protected | |
Proxy | protected | |
UserName | protected | |
Password | protected | |
Connected | protected | |
KeepConnection | protected | |
KeepConnectionReconnectLimit | protected | |
VerifySSLCertificate | protected | |
CertCAFileName | protected | |
TrustedCertsDir | protected | |
AfterSocketHandlerCreate | protected | |
MaxHeaderLineLength | protected | |
MaxHeaderCount | protected | |
MaxResponseSize | protected |
Methods
CheckHeader | protected | |
CreateEventSource | protected | |
StartEventStream | protected | |
HandlesEventstream | protected | |
DoVerifyCertificate | protected | |
NoContentAllowed | protected | |
DoNormalRequest | protected | |
DoKeepConnectionRequest | protected | |
IsConnected | protected | |
ProxyActive | protected | |
CreateProxyData | protected | |
DoDataRead | protected | |
DoDataWrite | protected | |
ParseStatusLine | protected | |
GetServerURL | protected | |
ProtocolSupported | protected | |
ReadFromSocket | protected | |
WriteToSocket | protected | |
ReadString | protected | |
WriteString | protected | |
WriteRequestBody | protected | |
CheckResponseCode | protected | |
ReadResponse | protected | |
ReadResponseHeaders | protected | |
AllowHeader | protected | |
HasConnectionClose | protected | |
ConnectToServer | protected | |
ReconnectToServer | protected | |
DisconnectFromServer | protected | |
DoMethod | protected | |
SendRequest | protected | |
GetSocketHandler | protected | |
ExtractSocket | protected | |
ExtractBuffer | protected | |
SimpleQuote | protected | |
Create | public | Creates a new HTTP client instance |
Destroy | public | Destroys the HTTP client instance |
AddHeader | public | Adds an HTTP header to a headers collection |
IndexOfHeader | public | Returns the index of a header in a headers collection |
GetHeader | public | Gets the value of a header from a headers collection |
Terminate | public | Terminates any ongoing HTTP operation |
HTTPMethod | public | Executes an HTTP request with the specified method |
Get | public | Performs an HTTP GET request |
GetEventSource | public | Creates a Server-Sent Events connection |
IsRedirect | public | Checks if an HTTP status code indicates a redirect |
RedirectForcesGET | public | Checks if a redirect status code forces GET method |
SimpleGet | public | Static method to perform a simple HTTP GET request |
Post | public | Performs an HTTP POST request |
SimplePost | public | Static method to perform a simple HTTP POST request |
Put | public | Performs an HTTP PUT request |
SimplePut | public | Static method to perform a simple HTTP PUT request |
Delete | public | Performs an HTTP DELETE request |
SimpleDelete | public | Static method to perform a simple HTTP DELETE request |
Patch | public | Performs an HTTP PATCH request |
SimplePatch | public | Static method to perform a simple HTTP PATCH request |
Options | public | Performs an HTTP OPTIONS request |
SimpleOptions | public | Static method to perform a simple HTTP OPTIONS request |
Head | public | Performs an HTTP HEAD request |
FormPost | public | Performs an HTTP POST request with form data |
SimpleFormPost | public | Static method to perform a simple form POST request |
FileFormPost | public | Performs an HTTP POST request with file upload |
StreamFormPost | public | Performs an HTTP form POST with stream upload |
SimpleFileFormPost | public | Static method to perform a simple file upload form POST |
Events
OnRedirect | protected | |
OnPassword | protected | |
OnDataReceived | protected | |
OnDataSent | protected | |
OnHeaders | protected | |
OnGetSocketHandler | protected | |
OnVerifySSLCertificate | protected | |
OnEventStream | protected |
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.
