© Kishori Sharan 2019
K. SharanJava 13 Revealedhttps://doi.org/10.1007/978-1-4842-5407-3_3

3. The HTTP Client API

Kishori Sharan1 
Montgomery, AL, USA
In this chapter, you will learn
  • What the HTTP Client API is

  • How to create HTTP clients

  • How to make HTTP requests

  • How to receive and process HTTP responses

  • How to push unsolicited data from server to client using server push

  • How to use HTTP basic authentication to authenticate access to resources on the server

  • How to create WebSocket client endpoints

JDK 9 and 10 delivered the HTTP Client API as an incubator module. JDK 11 included it as a standard module named java.net.http. The types are in the java.net.http package.

What Is the HTTP Client API?

Java has supported HTTP Client API from very early releases. ...

Get Java 13 Revealed: For Early Adoption and Migration now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.