From the course: Building Web APIs with ASP.NET Core 8
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
HTTP methods
From the course: Building Web APIs with ASP.NET Core 8
HTTP methods
- [Instructor] In this chapter, we will finally change the data in our data store, we will be writing new items to it. Remember, as of now, we are using the in-memory database, so when you restart the application, the data's gone. Keep that in mind and don't be confused if data you have just written seems to have vanished just a few minutes later if you restarted the application in between. That being out of the way, let's start. And since we are now writing information to the data store, we need to expand our arsenal of HTTP methods we are using. We've briefly covered it before, but now is a good time to reiterate, because we will be using that in our implementation in this chapter. So far, the HTTP method we've been working with was GET, GET for reading data. Remember, in REST we have a representation of data, and the URI serves as that representation, whereas the HTTP method denotes what we would like to do with that data or that resource. That means we'd like to read it. And if we…
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.
Contents
-
-
-
-
-
(Locked)
HTTP methods3m 8s
-
(Locked)
Model binding4m 31s
-
(Locked)
Adding an item with POST12m 14s
-
(Locked)
Model validation5m
-
(Locked)
Updating an item with PUT7m 59s
-
(Locked)
Deleting an item with DELETE4m 45s
-
(Locked)
Migrating the code to Minimal APIs6m 21s
-
(Locked)
Challenge: Deleting several items41s
-
(Locked)
Solution: Deleting several items5m 40s
-
(Locked)
-