Hands-On RESTful API Design Patterns and Best Practices
上QQ阅读APP看书,第一时间看更新

Leverage web architecture

Since its invention by Sir Tim Berners-Lee in 1989, the fundamentals of the web remain as the foundations of all web architecture even today. As you all know, HTTP is the lifeline of the web architecture, and it powers every single client request, server response, and transfer of a document/content over all of the web. So, it is imperative that REST APIs should embrace its bursting power by building interfaces that can be consumed by any device or operating system.

RESTful APIs should use HTTP as a transport layer since the infrastructure, server and client libraries for HTTP are widely available already.

RESTful APIs should take advantage of HTTP methods, or verbs, such as GET, PUT and POST defined by the RFC 2616 protocol. 

RFC 2616 ( https://tools.ietf.org/html/rfc2616) defines Internet standards for HTTP (the application-level protocol for distributed, collaborative, and hypermedia information systems).