In the previous recipe, Accessing remote data with HttpRequest, we saw how to use the
HttpRequest class to request and receive textual data from a remote server. How about the next most popular resources on the web: Images? The answer is a resounding yes. In this recipe, we will see how to pull down image binary data from the server specifically and display it in your JavaFX application.
In Chapter 5, JavaFX Media, we learned how to use the Image API to download images automatically. However, the API offers little control over the download process. In this recipe, we are going to use
HttpRequest, which provides granular control over the content of the image downloaded. For some portions of the code, ...