Book Image

Expert Delphi

By : Paweł Głowacki
Book Image

Expert Delphi

By: Paweł Głowacki

Overview of this book

Delphi is the most powerful Object Pascal IDE and component library for cross-platform native app development. It enables building natively compiled, blazingly fast apps for all major platforms including Android, iOS, Windows, Mac, and Linux. If you want to build server-side applications, create web services, and have clear GUIs for your project, then this book is for you. The book begins with a basic primer on Delphi helping you get accustomed to the IDE and the Object Pascal language and will then quickly move on to advanced-level concepts. Through this book, we’ll help you understand the architecture of applications and will teach you the important concepts of the FireMonkey library, show you how to build server-side services, and enable you to interact with the Internet of Things. Towards the end, you will learn to integrate your app with various web services and deploy them. By the end of the book, you will be able to build powerful, cross-platform, native apps for iOS and Android with a single code base.
Table of Contents (14 chapters)

Native HTTP client

Arguably the most important contemporary 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 the HTTP native client library, which provides uniform access to 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 the types defined in System.Net.HttpClient and System.Net.URLClient units, or you can rely on reusable components declared in the System.Net.HttpClientComponents unit that are available from the Tool Palette in the Net category:

Native HTTP client components in the Tool Palette

Let's give them a try and build a simple app that will allow us to enter the URL into an edit box, download...