From the course: Building Full-Stack Apps with React and Spring
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
GET ID endpoint
From the course: Building Full-Stack Apps with React and Spring
GET ID endpoint
- [Instructor] So the next step is to get a single person. So whenever you actually make API calls in most cases you're going to need, from time to time, to get a specific person or a specific point of data inside of your database and this is where getting a specific ID comes into play. So how do we do this inside of our API that we just created? Very similarly to getting the list of contacts, all you have to do is basically add the actual contact number at the end of your URL. So for example, /1 and the cool thing of working with Fring you get the actual link that you can use at each data point so basically here, so the href is actually the actual point that you can get this data and so on and so forth. Two, three and four so if you'd like to get the data from this person here what you could do is literally click on this link here and then do a get call and you get the information for this single user and the same thing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.