Building a native HTTP client
Arguably the most important network communication protocol is HTTP and its secure HTTPS version. Every operating system typically has its own HTTP client functionality built in. In the cross-platform world of Delphi programming, there is an HTTP client library, which provides uniform access to the HTTP client implementations available on different platforms.
Similar to other cross-platform libraries in Delphi, you can either work with HTTP entirely in code using types defined in the System.Net.HttpClient
and System.Net.URLClient
units, or you can rely on the ready-to-use components declared in the System.Net.HttpClientComponents
unit and available in the Net category of Tool Palette.
Let’s give it a try and build a simple app that will allow you to enter the URL into an edit box, download data using the HTTP GET request, and display the result in a memo component. These are the steps for building this demo:
- Create a new blank Delphi...