mithril.js
mithril.js copied to clipboard
m.request - data: args or {data: args}
components.md && piggybacking-requests-in-a-widgety-world.html
return m.request({method: "GET", url: "/api/contact", data: data})
mithril.components.md:
things: m.request({method: "GET", url: "/api/things/", {data: args}}) //slice the data in some way
mithril.request.md has no mention of data: at all although I seem to remember it being used in other parts of the documentation.
From the source it looks like data just gets parsed into URL parameters. I'm not clear as to which use is correct and under what circumstances it should be used.
Oops, that's a typo in the component page. Fixed