DELETE requests allow you to delete a resource from a system. Learn how to structure and make a DELETE request.
- [Instructor] Delete requests allow you … to remove a resource from a system. … We can delete a product by using this endpoint. … Let's create a new test, … and we'll call this one deleteProduct. … Let's go ahead and define our endpoint. … Let's also create a body. … Inside of the body, we'll need to specify the ID … of the product that we'd like to delete. … So let's go to the database to determine what's the ID … for the water bottle. … So I'll say select from the products table … where the name equals "Water Bottle". … And we can see that the ID is 19. … Perfect. So let's go ahead and add that ID to the body. … We can specify ID, and then the value, which is 19. … Great. Now we're ready to make our requests. … So we're going to store that inside of the response. … And we'll say, given this body, … when we call the delete method on this endpoint, … then we'll get a response. … And we can print this response out … by saying response.log.body. … Great. Let's run it. … When we run that, we see that we do get a message saying …
Skill Level Intermediate
API setup3m 46s
1. Getting Started with REST Assured
REST Assured testing library3m 29s
2. Making API Requests
3. Validating API Responses
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.