{"action":"created","issue":{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1988","repository_url":"https://api.github.com/repos/buttonmen-dev/buttonmen","labels_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1988/labels{/name}","comments_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1988/comments","events_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1988/events","html_url":"https://github.com/buttonmen-dev/buttonmen/issues/1988","id":153667093,"number":1988,"title":"the UI should retry POST requests","user":{"login":"cgolubi1","id":2898207,"avatar_url":"https://avatars.githubusercontent.com/u/2898207?v=3","gravatar_id":"","url":"https://api.github.com/users/cgolubi1","html_url":"https://github.com/cgolubi1","followers_url":"https://api.github.com/users/cgolubi1/followers","following_url":"https://api.github.com/users/cgolubi1/following{/other_user}","gists_url":"https://api.github.com/users/cgolubi1/gists{/gist_id}","starred_url":"https://api.github.com/users/cgolubi1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgolubi1/subscriptions","organizations_url":"https://api.github.com/users/cgolubi1/orgs","repos_url":"https://api.github.com/users/cgolubi1/repos","events_url":"https://api.github.com/users/cgolubi1/events{/privacy}","received_events_url":"https://api.github.com/users/cgolubi1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-08T17:19:29Z","updated_at":"2016-05-10T16:13:05Z","closed_at":null,"body":"When the UI POSTs to an API method and gets a timeout or other evidence that the message didn't actually make it to the server, it should retry.\r\n\r\nNote: in order for this to be a good idea, we'll need to make all API methods correctly idempotent, i.e. make them do something reasonable if the first request actually did succeed and it's just that the response was lost.  So this may take a bit of doing.  However, the short-term fix of only retrying read-only API methods like loadGameData would still reduce user pain substantially."},"comment":{"url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/comments/218209052","html_url":"https://github.com/buttonmen-dev/buttonmen/issues/1988#issuecomment-218209052","issue_url":"https://api.github.com/repos/buttonmen-dev/buttonmen/issues/1988","id":218209052,"user":{"login":"jl8e","id":2898685,"avatar_url":"https://avatars.githubusercontent.com/u/2898685?v=3","gravatar_id":"","url":"https://api.github.com/users/jl8e","html_url":"https://github.com/jl8e","followers_url":"https://api.github.com/users/jl8e/followers","following_url":"https://api.github.com/users/jl8e/following{/other_user}","gists_url":"https://api.github.com/users/jl8e/gists{/gist_id}","starred_url":"https://api.github.com/users/jl8e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jl8e/subscriptions","organizations_url":"https://api.github.com/users/jl8e/orgs","repos_url":"https://api.github.com/users/jl8e/repos","events_url":"https://api.github.com/users/jl8e/events{/privacy}","received_events_url":"https://api.github.com/users/jl8e/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T16:13:05Z","updated_at":"2016-05-10T16:13:05Z","body":"I have JS that does this. In addition to trying to make requests not a problem if repeated, I also include an additional header that the back-end can use to identify a duplicate request. The back-end code isn’t useful (it’s Python/Django), but the JS probably is, though it’ll need some untangling from the rest of the JS library I accreted."}}