Reader small image

You're reading from  Full Stack Development with Spring Boot and React - Third Edition

Product typeBook
Published inApr 2022
Reading LevelIntermediate
PublisherPackt
ISBN-139781801816786
Edition3rd Edition
Languages
Right arrow
Author (1)
Juha Hinkula
Juha Hinkula
author image
Juha Hinkula

Juha Hinkula is a software development lecturer at Haaga-Helia University of Applied Sciences in Finland. He received an MSc degree in Computer Science from the University of Helsinki and he has over 17 years of industry experience in software development. Over the past few years, he has focused on modern full stack development. He is also a passionate mobile developer with Android-native technology, and also uses React Native.
Read more about Juha Hinkula

Right arrow

Chapter 4

  1. REST is an architectural style for creating web services, and it defines a set of constraints.
  2. The easiest way to create a RESTful web service with Spring Boot is to use the Spring Data REST starter package. By default, the Spring Data REST package finds all public repositories and creates automatically RESTful web services for your entities.
  3. You can send a GET request to the endpoint of the entity. For example, if you have an entity class called Car, the Spring Data REST package creates an endpoint called /cars that can be used to fetch all cars.
  4. You can send a DELETE request to the endpoint of the individual entity item. For example, /cars/1 deletes a car with the ID 1.
  5. You can send a POST request to the endpoint of the entity. The header must contain the Content-Type field with the value application/json. The new item will be embedded in the request body.
  6. You can send a PATCH request to the endpoint of the entity. The header must contain the Content...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Full Stack Development with Spring Boot and React - Third Edition
Published in: Apr 2022Publisher: PacktISBN-13: 9781801816786

Author (1)

author image
Juha Hinkula

Juha Hinkula is a software development lecturer at Haaga-Helia University of Applied Sciences in Finland. He received an MSc degree in Computer Science from the University of Helsinki and he has over 17 years of industry experience in software development. Over the past few years, he has focused on modern full stack development. He is also a passionate mobile developer with Android-native technology, and also uses React Native.
Read more about Juha Hinkula