fix content-type header for urlencoded form data

This commit changes the content-type header for urlencoded form data
(hx-post) as proposed in #74 and #717.
This commit is contained in:
Patrik Keller 2022-01-16 20:26:09 +01:00
parent ede73a498b
commit c5b66dd221

View File

@ -2311,7 +2311,7 @@ return (function () {
var filteredParameters = filterValues(allParameters, elt);
if (verb !== 'get' && getClosestAttributeValue(elt, "hx-encoding") == null) {
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
headers['Content-Type'] = 'application/x-www-form-urlencoded';
}
// behavior of anchors w/ empty href is to use the current URL