TornadoFX comes with a REST client that makes it easy to perform JSON-based REST calls.
The underlying HTTP engine interface has two implementations:
- By default, it uses HttpURLConnection
- Apache HttpClient
To change the HTTP engine to the Apache HttpClient implementation, we will simply need to call Rest.useApacheHttpClient() in the init block of the App class.