Curd functions are synonymous of modifying the information in the database world. If you have heard the CRUD before. It means create, Read, Update & delete. Level 2 of Richardson maturity level is about matching services with their HTTP Verbs. CRUD functions are mapped to their HTTP equivalents. So, we use
Often times, people will use POST for Create and Update because of return types PUT allows.
To use JSON all we have to do to annotate our method Produces like
It tells us that application is producing JSON
Binary is not necessarily an alternative to JSON or XML
It is used to serve objects. e.g.,
Here I does mean JAVA objects, binary things we normally serves statically or that are stored in your database. To use binary we annotate our method Produces like