Post Haste: Using HttpClient to Post Forms to HTTP Servers

Java developers commonly write applications that connect to a website to retrieve a resource from a URL. The data might be HTML, XML (as in Chapter 3), a standard text file, an image, or any other type of content. Perhaps the data will be incorporated into a Swing GUI or placed into a dynamically generated web page. In other cases the program further processes the data in some other way. Long ago, the core Java API provided a convenient way to make simple web requests and read the data as a stream. The java.net.URL class can make a request and read data from the HTTP response, ...

Get Wicked Cool Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.