You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/01_course_intro/04_what_is_rest_api/README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ An API client can be any device, such as a web app or a mobile app.
84
84
85
85
### Making an API for your own consumption
86
86
87
-
Make software companies make APIs that only they use (so they aren't fully public).
87
+
Many software companies make APIs that only they use (so they aren't fully public).
88
88
89
89
Here's an example. You're making a multiplayer mobile game, and you need to store information about the moves that your character is making.
90
90
@@ -109,7 +109,7 @@ REST APIs deal in resources, so every individual "thing" that can be named is a
109
109
The main characteristics (or constraints) of a REST API are:
110
110
111
111
1.**Uniform interface**. Whichever way clients should access a certain resource should also be the way the access other resources. Clients should have a single way to retrieve resources.
112
-
2.**Client-server**. Clients should know the endpoints of the API, but they should not be coupled to the development of the API. A client or a servevr may be swapped out for a different implementation without the other noticing.
112
+
2.**Client-server**. Clients should know the endpoints of the API, but they should not be coupled to the development of the API. A client or a server may be swapped out for a different implementation without the other noticing.
113
113
3.**Stateless**. The server (API) doesn't store anything about previous client requests. Each client request is treated as a brand new client. If the client needs the server to personalize the response, then the client must send the server whatever information the server needs in order to do so.
114
114
4.**Cacheable**. The client or server must be able to cache the resources returned by the API. This is a very general constraint, but it's an important one.
115
115
5.**Layered system**. REST APIs may be developed as multiple layers, where each layer interacts [only with the layer above and below it](https://excalidraw.com/#json=or3Umoigss4yIeuKg3cO8,qH6uDDCXc7DSjweqNvlmzw).
@@ -156,7 +156,7 @@ We'll deal with user authentication in a later section, but that's what the lock
156
156
|`GET`|`/store`| Get a list of all stores. |
157
157
|`POST`|`/store`| Create a store. |
158
158
|`GET`|`/store/{id}`| Get a single store, given its unique id. |
159
-
|`POST`|`/store/{id}`| Delete a store, given its unique id. |
159
+
|`DELETE`|`/store/{id}`| Delete a store, given its unique id. |
160
160
161
161
### Items
162
162
@@ -191,4 +191,4 @@ Then, over the following sections, we'll improve on this REST API. We'll add:
191
191
- Add user authentication.
192
192
- Add item tagging.
193
193
- Add an admin panel so changing data manually is a bit easier.
0 commit comments