When you are working with REST, there are some principles that you should keep in mind, and these principles should provide guidance for your design choices when you are doing API design.
These are the following verbs found in HTTP:
GET
: This is often used to answer queriesPUT
: This is often used to insert dataPOST
: This is often used to update dataDELETE
: This is often used to remove data
Why do we keep saying often? Well, there are some exceptions in regards of size limitations. For instance, for the GET
verb, we can't have a request bigger than 8192 bytes or 8 KB. If you need to send a bigger payload, we will need to use the POST
verb.