Merge remote-tracking branch 'origin/master'

This commit is contained in:
carson 2020-06-15 12:12:15 -07:00
commit 8933030b52
2 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,12 @@
htmx.defineExtension('json-enc', {
onEvent: function (name, evt) {
if (name === "configRequest.htmx") {
evt.detail.headers['Content-Type'] = "application/json";
}
},
encodeParameters : function(xhr, parameters, elt) {
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.overrideMimeType('text/json');
return (JSON.stringify(parameters));
}
});
});

View File

@ -18,7 +18,7 @@ Here is an example:
```html
<div hx-sse="connect /event_stream">
<div hx-get="/chatroom" hx-trigger="chatter">
<div hx-get="/chatroom" hx-trigger="sse:chatter">
...
</div>
</div>