Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Building a RESTful Web Service with Spring

You're reading from   Building a RESTful Web Service with Spring A hands-on guide to building an enterprise-grade, scalable RESTful web service using the Spring Framework

Arrow left icon
Product type Hardcover
Published in Jan 2018
Last Updated in Feb 2025
Publisher
ISBN-13 9781788475891
Length 228 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Dewailly Dewailly
Author Profile Icon Dewailly
Dewailly
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. A Few Basics FREE CHAPTER 2. Building RESTful Web Services in Spring 5 with Maven 3. Flux and Mono (Reactor Support) in Spring 4. CRUD Operations in Spring REST 5. CRUD Operations in Plain REST (Without Reactive) and File Upload 6. Spring Security and JWT (JSON Web Token) 7. Testing RESTful Web Services 8. Performance 9. AOP and Logger Controls 10. Building a REST Client and Error Handling 11. Scaling 12. Microservice Basics 13. Ticket Management – Advanced CRUD 14. Other Books You May Enjoy

Building a REST client


So far, we have created a REST API and consumed it in third-party tools such as SoapUI, Postman, or JUnit testing. There might be situations where you will have to consume a REST API using the regular method (service or another controller method) itself like payment API call in service API. It will be useful when you call a third-party API such as PayPal or a weather API in your code. In such situations, having a REST client will be helpful for getting the job done.

Here, we will talk about how to build a REST client to consume another REST API in our method. Before moving onto that, we will talk a little bit about RestTemplate in Spring.

RestTemplate

RestTemplate is a Spring class that is used to consume the REST API from the client side through HTTP. By using RestTemplate, we can keep the REST API consumer in the same application as well, so we don't need a third-party application or another application to consume our API. RestTemplate can be used use to call GET, POST...

lock icon The rest of the chapter is locked
Visually different images
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.
Building a RESTful Web Service with Spring
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 $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon