Client/server development using standard Java classes
Specifically, we will use the HttpURLConnection
and HTTPServer
classes to implement a client and server application. These classes support much of the functionality required for clients and servers. Using these classes will avoid writing low-level code to implement HTTP functionality. Low-level code refers to the non-specialized classes, such as the Socket
class. Higher-level and more specialized classes, such as the HttpURLConnection
and HTTPServer
classes, supplement and provide additional support for specialized operations.
The HttpURLConnection
class is derived from the HttpConnection
class. This base class has a number of methods that not are directly concerned with the HTTP protocol.
Get Learning Network Programming with 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.