3 ms·
I am not certain I know the "right way" to deal with this, but a common way that makes my life as a consumer of APIs much easier is to make the API idempotent (
by saurik 14y ago
I am not certain I know the "right way" to deal with this, but a common way that makes my life as a consumer of APIs much easier is to make the API idempotent (if I pass the same request, including a nonce, I get back the exact same result as the earlier request). There are other solutions, though; I will claim that most of them that I have seen, however, involve making the client much more complex (such as a search system, unless the search system allows me to search by the nonce; an example of doing the search solution reasonably is Amazon Payments, and an example of doing the idempotent API reasonably is PayPal v74.0+).
(BTW: the possibly short snippet for my long post might me "API semantics that make it impossible to build a completely automated solution even in the case of failures, either transient or persistent".)