March 2019
Intermediate to advanced
242 pages
6h 21m
English
Before diving into the details of the individual classes of the HTTP Client, I'm including a basic example to let you get a hang of sending a request to a server and processing the response using the HTTP Client. I'll add to this example as we move forward, covering HttpClient, HttpRequest, and HttpResponse in detail. This is to help you get the bigger picture and then dive into the details.
The following example shows how to create a basic HttpClient instance, use it to access a URI encapsulated by HttpRequest, and process the response, accessible as a HttpResponse instance:
// basic HttpClient instance HttpClient client = HttpClient.newHttpClient(); // Using builder pattern to get a basic HttpRequest instance with just ...
Read now
Unlock full access