When creating fully connected rich client applications, part of the expected standard functionalities, sometimes, is the ability to exchange files with the server. We have already seen how to download an image from the server (see recipe Downloading images with HttpRequest). In this recipe, we will look at how to use
HttpRequest to upload an image to the server.
The concepts presented here deals with HTTP and the
HttpRequest object in JavaFX. You should already have an understanding of the basic mechanics behind the Web and how
HttpRequest interacts with web servers to handle the request/response life cycle. Refer to the recipes Accessing remote data with HttpRequest, Downloading images ...