mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-30 22:41:23 +00:00
Merge pull request #47 from GavinRay97/patch-1
Fix json-enc extension content-type header set
This commit is contained in:
commit
fe158bac0f
@ -1,7 +1,7 @@
|
||||
htmx.defineExtension('json-enc', {
|
||||
encodeParameters : function(xhr, parameters, elt) {
|
||||
xhr.requestHeaders['Content-Type'] = 'application/json';
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.overrideMimeType('text/json');
|
||||
return (JSON.stringify(parameters));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user