Java Fundamentals: HttpClient

With Java's HttpClient API you can easily perform HTTP calls. It's a modern API supporting HTTP/1.1, HTTP/2, and WebSockets. This course shows how to work with HttpClient in a practical manner, and also explores some advanced features.
Course info
Level
Intermediate
Updated
May 15, 2019
Duration
1h 45m
Table of contents
Description
Course info
Level
Intermediate
Updated
May 15, 2019
Duration
1h 45m
Description

It used to be that performing HTTP calls in Java meant relying on an external library like Apache HttpClient. Since Java 11, a modern HTTP client is now part of the core platform. In this course, Java Fundamentals: HttpClient, you will gain the ability to work with this HttpClient API. First, you will learn to use HttpClient in a synchronous and asynchronous manner, including the use of CompletableFuture. Next, you will discover how to configure and use HttpClient in different scenarios, focusing on secure communication as well. Finally, you will explore some of the more advanced features of HttpClient, such as HTTP/2 Server Push, WebSocket communication, and Reactive Streams integration. When you're finished with this course, you will have the skills and knowledge of the HttpClient API needed to use it effectively in your own applications.

About the author
About the author

Sander is Director of Technology at Picnic —the Dutch online grocery scale-up— building Java-based systems at scale. He also is a Java Champion and author of the O'Reilly book 'Java 9 Modularity' (see javamodularity.com). As an avid conference speaker, Sander loves sharing knowledge, also through his blog at http://branchandbound.net and as Pluralsight instructor.

More from the author
What’s New in Java 13
Intermediate
46m
Aug 9, 2019
What's New in Java 12
Intermediate
1h 8m
Mar 18, 2019
More courses by Sander Mak
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone. My name is Sander Mak, and welcome to my course Java Fundamentals: HttpClient. I'm a fellow and software architect at Luminous in the Netherlands and author of the O'Reilly book Java 9 Modularity. It used to be that performing HTTP calls in Java meant using an external library such as Apache HttpClient or OkHttp. That changed after an all new HttpClient was introduced in Java 11. Now, a modern and full-featured HttpClient is part of the core Java platform. Recent standards, such as HTTP/2 and WebSocket, are fully supported. Whenever you need to perform HTTP calls, you should reach for this HttpClient API. In this course, we'll look at the basic features of HttpClient, as well as explore some of its more advanced features. Through both explanations and hands-on examples, you'll learn how the API works and what it can do. Among other things, the following topics are covered. We'll start with the basics by looking at how we can perform HTTP requests, and we'll dive into both a synchronous blocking API, as well as the asynchronous and non-blocking API that's part of HttpClient. We'll also see how HttpClient supports secure communication. And finally, we'll explore some more advanced features like support for HTTP/2 Server Push, WebSocket, and integration with Reactive Streams. This course assumes you have experience with Java development and that you have a general knowledge of the HTTP protocol itself. After finishing this course, you'll know enough about the HttpClient API to start using it predictably in your own code. I hope you'll join me on this journey to start learning about Java's HttpClient API with the Java Fundamentals: HttpClient course, here at Pluralsight.