Chapter 1. Using the Uniform Interface
HTTP is an application-level protocol that defines
operations for transferring representations between clients and servers.
In this protocol, methods such as GET, POST,
PUT, and DELETE are operations on resources.
This protocol eliminates the need for you to invent application-specific
operations such as createOrder,
getStatus, updateStatus, etc. How much you can benefit from
the HTTP infrastructure largely depends on how well you can use HTTP as an
application-level protocol. However, a number of techniques including SOAP
and some Ajax web frameworks use HTTP as a protocol to transport messages.
Such usage makes poor use of HTTP-level infrastructure. This chapter
presents the following recipes to highlight various aspects of using HTTP
as an application protocol:
- Recipe 1.1
Visibility is one of the key characteristics of HTTP. Use this recipe to learn how to maintain visibility.
- Recipe 1.2
There are cases when you may need to forgo visibility to meet application needs. Use this recipe to find some scenarios.
- Recipe 1.3
Use this recipe to learn the best way to manage state.
- Recipe 1.4
Maintaining safety and idempotency helps servers guarantee repeatability for requests. Use this recipe when implementing servers.
- Recipe 1.5
Follow this recipe to implement clients for safety and idempotency principles.
- Recipe 1.6
Use this recipe to learn when to use
GET.- Recipe 1.7
Use this recipe to learn when to use
POST.- Recipe 1.8
Use this recipe to learn how to create new ...