summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorVincent <vichenzo-thebaud@hotmail.com>2023-06-24 22:27:13 +0200
committerGitHub <noreply@github.com>2023-06-24 14:27:13 -0600
commit714adc46e3b54ef6bc16fafcf83141c416b293b9 (patch)
treebbb4677132216100ac8151cd896c337532607f32
parentd3788776d69b9b268eef1db25b0a9b8b75437d31 (diff)
downloadhtmx-714adc46e3b54ef6bc16fafcf83141c416b293b9.tar.gz
htmx-714adc46e3b54ef6bc16fafcf83141c416b293b9.zip
Encode as URL params for DELETE requests, instead of using body (#1513)
-rw-r--r--src/htmx.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/htmx.js b/src/htmx.js
index 8782d837..b2f9b54d 100644
--- a/src/htmx.js
+++ b/src/htmx.js
@@ -3006,7 +3006,7 @@ return (function () {
var pathNoAnchor = splitPath[0];
var anchor = splitPath[1];
var finalPathForGet = null;
- if (verb === 'get') {
+ if (verb === 'get' || verb === 'delete') {
finalPathForGet = pathNoAnchor;
var values = Object.keys(filteredParameters).length !== 0;
if (values) {
@@ -3020,7 +3020,7 @@ return (function () {
finalPathForGet += "#" + anchor;
}
}
- xhr.open('GET', finalPathForGet, true);
+ xhr.open(verb.toUpperCase(), finalPathForGet, true);
} else {
xhr.open(verb.toUpperCase(), path, true);
}