JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://unpkg.com/htmx.org@1.9.11"></script>
<a href="/whatever" hx-post="/test" hx-on:htmx-after-request="this.removeAttribute('hx-post');htmx.process(this);this.click()">Click me and check your Network tab</a>