CoAP is based on REST architecture, which is a general design for accessing Internet resources. In order to overcome disadvantages in constrained resources, CoAP needs to optimize the length of the datagram and provide reliable communication. On one side, CoAP provides URI, REST methods such as GET, POST, PUT, and DELETE.