diff --git a/pkg/appview/src/js/main.js b/pkg/appview/src/js/main.js index 1f6b917..83be2c9 100644 --- a/pkg/appview/src/js/main.js +++ b/pkg/appview/src/js/main.js @@ -3,6 +3,11 @@ import htmx from 'htmx.org'; import 'htmx-ext-json-enc'; window.htmx = htmx; +// htmx 2.x puts DELETE params in the URL by default, which breaks json-enc +// (encodeParameters is never called, leaving an empty request body). Keep +// only GET using URL params so DELETE bodies get JSON-encoded properly. +htmx.config.methodsThatUseUrlParams = ['get']; + // Actor Typeahead (web component, auto-registers on import) import 'actor-typeahead';