How to prevent duplicate HTTP requests?

We have mobile devices Intermec CK71 (WiFi). There will always be a scenario in which the device sends a request (GET, PUT or POST) and then loses connection. What methods can we use to prevent duplication of PUT or POST? How does the client device know if the server processed its request before losing the connection?

I saw similar posts , but the noticeable answer did not go into details. I don’t even know where to start. Should I look for caching (ETag, last change) or some kind of confirmation?

The client device has .Net Compact Framework 3.5 on it and enters the server through its Web API 2 endpoints.

If someone can point me in the right direction or offer any suggestions, it will be very appreciated. Thanks.

+4
source share
1 answer

I do not use REST, but as far as I read the information, there is no easy way to get confirmation and avoid duplicate POST.

As with other high-level APIs, you are tied to what the API offers, and it looks like the designers did not think of connection interruptions.

, , UID . OK POST, , - . UID, , , POST , POST UID.

, - , REST, SQL-. , POST "", - .

, REST.

+2

Source: https://habr.com/ru/post/1626037/


All Articles