What is REST API?

REST is a guideline & set of rules of how to deal with API.

<aside> <img src="/icons/fabric-swatch_purple.svg" alt="/icons/fabric-swatch_purple.svg" width="40px" /> It's similar to DFAs in the part where it is stateless

</aside>

REST VS RPC EXAMPLE

RPC

<aside> 🚨 RPC (remote procedure call) Basically a list of action commands you can call on.

</aside>

Opposite of REST could be considered to be RPC

Say you have a command that's is like "Paint this thing"

RPC does it like:

  1. You first have a generic paint action
  1. You have an input parameter for what "thing" you want painted

REST