The RTL provides two components that you can use to send HTTP requests to servers and handle their responses:
- TNetHTTPClient
- TNetHTTPRequest
Alternatively, as we saw in Chapter 3, Knowing Your Friends – The Delphi RTL, you can use an instance of THTTPClient to manage your HTTP requests.
Why use these components instead of good old TidHTTP from the INDY suite? The reasons have been explained in Chapter 3, Knowing Your Friends – The Delphi RTL, in the Delphi RTL section. However, in this recipe we'll use the new HTTP client to show how much of the deployment is simplified, also in mobile apps, using these new components instead of the INDY ones, at least for HTTP communications.
Long story short, Embarcadero developed a native HTTP client library that is not based on INDY or OpenSSL, but that relies on the OS API to implement...