-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Labels
Type: BugFor bugs and any other unexpected breakageFor bugs and any other unexpected breakageType: EnhancementFor any feature request or suggestion that isn't a bug fixFor any feature request or suggestion that isn't a bug fixminor
Description
Per https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send
A body of data to be sent in the XHR request. This can be:
- A Document, in which case it is serialized before being sent.
- An XMLHttpRequestBodyInit, which per the Fetch spec can be a Blob, an ArrayBuffer, a TypedArray, a DataView, a FormData, a URLSearchParams, or a string object or value.
- null
We only support a subset of these:
Lines 143 to 146 in 645cf66
| if (body == null) xhr.send() | |
| else if (typeof args.serialize === "function") xhr.send(args.serialize(body)) | |
| else if (body instanceof $window.FormData || body instanceof $window.URLSearchParams) xhr.send(body) | |
| else xhr.send(JSON.stringify(body)) |
Mithril.js version:
All versions up to 2.2.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugFor bugs and any other unexpected breakageFor bugs and any other unexpected breakageType: EnhancementFor any feature request or suggestion that isn't a bug fixFor any feature request or suggestion that isn't a bug fixminor