JavaScript REST APIs with Express Getting to Know REST APIs HTTP Methods and CRUD Operations

Sarah Krabacher
Sarah Krabacher
Full Stack JavaScript Techdegree Student 12,437 Points

Is Create a rough equivalent to Get or to Post?

at 0:37 the video implies the Create and Get are rough equivalents... wouldn't Create and Post be the actual rough equivalent? Create = Post, Read = Get, Update = Put, Delete = Delete.

Blake Larson
Blake Larson
12,562 Points

Correct. POST routes are often where some sort of data model is created. GET requests are for a return of some sort of data.

1 Answer

Ed Pham
Ed Pham
2,013 Points

In most scenarios, I believe it is more appropriate to POST data to CREATE a new entity rather than making a GET request. However, theoretically, it is possible to implement CREATE with either a GET or POST request.