mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 15:25:26 +00:00
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:
parent
ede73a498b
commit
c5b66dd221
@ -2311,7 +2311,7 @@ return (function () {
|
|||||||
var filteredParameters = filterValues(allParameters, elt);
|
var filteredParameters = filterValues(allParameters, elt);
|
||||||
|
|
||||||
if (verb !== 'get' && getClosestAttributeValue(elt, "hx-encoding") == null) {
|
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
|
// behavior of anchors w/ empty href is to use the current URL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user