Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
The Java Workshop

You're reading from   The Java Workshop Learn object-oriented programming and kickstart your career in software development

Arrow left icon
Product type Paperback
Published in Oct 2019
Publisher Packt
ISBN-13 9781838986698
Length 606 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (6):
Arrow left icon
David Cuartielles David Cuartielles
Author Profile Icon David Cuartielles
David Cuartielles
Andreas Göransson Andreas Göransson
Author Profile Icon Andreas Göransson
Andreas Göransson
Eric Foster-Johnson Eric Foster-Johnson
Author Profile Icon Eric Foster-Johnson
Eric Foster-Johnson
Pradeep Kumar Gupta Pradeep Kumar Gupta
Author Profile Icon Pradeep Kumar Gupta
Pradeep Kumar Gupta
Scott Cosentino Scott Cosentino
Author Profile Icon Scott Cosentino
Scott Cosentino
Avinash Kate Avinash Kate
Author Profile Icon Avinash Kate
Avinash Kate
+2 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Learning the Basics 3. Object-Oriented Programming 4. Collections, Lists and Java's Built-In APIs 5. Exceptions 6. Libraries, Packages, and Modules 7. Databases and JDBC 8. Sockets, Files, and Streams 9. Working with HTTP 10. Encryption 11. Processes 12. Regular Expressions 13. Functional Programming with Lambda Expressions 14. Recursion 15. Processing Data with Streams 16. Predicates and Other Functional Interfaces 17. Reactive Programming with Java Flow 18. Unit Testing Appendix

Summary

This chapter introduces HTTP networking, which is often used to connect to RESTful web services from within Java applications. HTTP is a textual request-response protocol. A client sends a request to a server and then gets a response. Each HTTP request has a method; for instance, you would use the GET request to retrieve data, POST to send data, and so on. In Java applications, you will often send and receive text in JSON format.

The HttpUrlConnection class provides the primary way to make HTTP requests. Your code writes to an output stream to send data, then reads the response from an input stream. The open-source jsoup library provides a convenient API to retrieve and parse HTML data. Starting with Java 11, you can use the java.net.http module for a more modern Reactive Streams approach to HTTP networking. In the next chapter, you'll learn about certificates and encryption—both commonly used with HTTP networking.

lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
The Java Workshop
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon