Customers who do understand the semantics of the http://relations.restbucks.com/coffee-card relation but who don’t already have a coffee card can issue a simple GET request to the URI identified by the coffee-card link.
Yes, according to the HTTP specification a GET request should not have any server-side effects, REST is a contract between the client and the service. If the service chooses to do something unrelated to servicing the GET, it does not violate REST. It is incredibly common to write logs, for instance, in processing any request. In this case, the service has created a relationship with the client, effectively establishing a cache or other resources that the client can draw upon in other calls.
Exactly how the service authorizes the client to access the card (ie – client credentials) is out of scope for pure REST. And, returning a 5XX error on a GET request because the card record could not be written – that is a technical violation of the contract, but it happens all the time.
--
You received this message because you are subscribed to the Google Groups "restinpractice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
restinpractic...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/restinpractice/37d1d280-9254-4ad4-8b73-e5302b0a1aa2%40googlegroups.com.
If the service chooses to do something unrelated to servicing the GET, it does not violate REST. It is incredibly common to write logs, for instance, in processing any request.
In this case, the service has created a relationship with the client, effectively establishing a cache or other resources that the client can draw upon in other calls.
Exactly how the service authorizes the client to access the card (ie – client credentials) is out of scope for pure REST. And, returning a 5XX error on a GET request because the card record could not be written
To unsubscribe from this group and stop receiving emails from it, send an email to restinp...@googlegroups.com.