path-params
ExtensionThis extension uses request parameters to populate path variables. Used parameters are removed so they won’t be sent in the query string or body anymore.
<script src="https://unpkg.com/htmx.org/dist/ext/path-params.js">
This would invoke URL /items/42?foo=bar
<div hx-ext="path-params">
<a hx-get="/items/{itemId}" hx-vals='{"itemId": "42", "foo": "bar"}'>test</div>
</div>