Skip to content

m.request should support more data for the request body #2812

@pygy

Description

@pygy

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:

We only support a subset of these:

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

Metadata

Metadata

Labels

Type: BugFor bugs and any other unexpected breakageType: EnhancementFor any feature request or suggestion that isn't a bug fixminor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions