android - Designing REST API for duplicate calls -


when designing rest-ful api, need handle client connectivity status?

for example: in android, user wants send billing details email. clicks "send" button, app goes call api endpoint. @ point before api returns response, app loses network connectivity. meanwhile, transaction on server-side (sending bill details user's email) done. user doesn't know , clicks "send" button again. later when checks email, there 2 emails billing details.

now understand transactions such shopping basket, client needs include transaction id in request body make idempotent. but, need use method other api calls?


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -