<p>I don't know exactly how this would be implemented in Rails. One approach I found on the web used some custom Idempotency middleware, and used a db table to manage previous results (or on file / redis / whatever): <a href="https://ieftimov.com/post/understand-how-why-add-idempotent-requests-api/" rel="nofollow">https://ieftimov.com/post/understand-how-why-add-idempotent-requests-api/</a></p>
<p>That would still all be synchronous as today, with the only addition of requiring an "Idempotency-Key" http header.</p>
<p>Did you have something similar in mind?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-480499265">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLZIgmPRLDv-Mfc6BOyIvK_J-RISjks5veI8OgaJpZM4cgFOf">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLTE1okpAThG6KS1Dve2JoZDqUvNrks5veI8OgaJpZM4cgFOf.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@mmd-osm in #2201: I don't know exactly how this would be implemented in Rails. One approach I found on the web used some custom Idempotency middleware, and used a db table to manage previous results (or on file / redis / whatever): https://ieftimov.com/post/understand-how-why-add-idempotent-requests-api/\r\n\r\nThat would still all be synchronous as today, with the only addition of requiring an \"Idempotency-Key\" http header.\r\n\r\nDid you have something similar in mind?\r\n\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-480499265"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-480499265",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2201#issuecomment-480499265",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>