fpHTTPClient unit
HTTP client implementation for making HTTP requests
The fpHttpClient unit provides a complete HTTP client implementation for making HTTP requests.
It supports all standard HTTP methods (GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD), SSL/TLS connections, redirects, authentication, cookies, and form posting including file uploads.
The main classes are TFPCustomHTTPClient (base class) and TFPHTTPClient (with published properties). The unit also supports Server-Sent Events through TCustomHTTPEventSource and proxy connections through TProxyData.
Classes and records
EHTTPClient | class | Exception class for HTTP client errors |
EHTTPClientSocket | class | Exception class for HTTP client socket errors |
EHTTPClientSocketRead | class | Exception class for HTTP client socket read errors |
EHTTPClientSocketWrite | class | Exception class for HTTP client socket write errors |
TCustomHTTPEventSource | class | Base class for Server-Sent Events (SSE) client |
TFPCustomHTTPClient | class | Base HTTP client class for making HTTP requests |
TFPHTTPClient | class | Full-featured HTTP client with published properties |
THTTPEventSource | class | Default Server-Sent Events source implementation |
TProxyData | class | Proxy server configuration data |
Procedures and functions
DecodeURLElement | function | URL-decodes a string from URL encoding |
EncodeURLElement | function | URL-encodes a string for use in URLs |
Types
TDataEvent | procedure type | Event type for tracking data transfer progress |
TGetSocketHandlerEvent | procedure type | Event type for providing custom socket handlers |
THTTPEventStreamHandler | procedure type | Event type for handling Server-Sent Events streams |
THTTPVerifyCertificateEvent | procedure type | Event type for SSL certificate verification |
TPasswordEvent | procedure type | Event type for handling authentication challenges |
TRedirectEvent | procedure type | Event type for handling HTTP redirects |
TSocketHandlerCreatedEvent | procedure type | Event type called after socket handler creation |
Constants
DefaultMaxHeaderCount | constant | |
DefaultMaxHeaderLineLength | constant | |
DefaultMaxResponseSize | constant | |
DefMaxRedirects | constant | Default maximum number of HTTP redirects to follow |
ReadBufLen | constant | Default buffer size for socket reading operations |
Topics
fpHttpClientAdvanced | topic | Advanced TFPHTTPClient Features |
fpHttpClientFileUpload | topic | File Upload with Local Filename |
fpHttpClientFormPost | topic | Form Data and File Upload with fpHttpClient |
fpHttpClientHttps | topic | HTTPS Support in TFPHTTPClient |
fpHttpClientMethods | topic | HTTP Methods with TFPHTTPClient |
fpHttpClientUsage | topic | Using the TFPHTTPClient |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
