All modern rich client platforms provide ways to communicate with external servers. The Web and its associated protocols have become de facto technologies for building client-server applications. This recipe shows how to use JavaFX to communicate with web servers over HTTP using the
HttpRequest object from JavaFX's IO API. You will learn how to submit a request to a remote web server and use HttpRequest's event-driven callback functions to handle responses from the server.
Prior to getting started with
HttpRequest, you should have an understanding of the basic mechanics behind the Web and its HTTP protocol (see the HTTP reference at the end of this recipe). JavaFX's
HttpRequest class, located ...