On Mon, Feb 24, 2020 at 6:01 PM Matthew Dowdell <mdowdell...@gmail.com>
wrote:

> This module takes POST requests, so I'd just send it as part of the
> request body, but when it comes to deserialising it, I'm not really sure
> what to deserialise it to as everything seems to assume primitive values,
> e.g. strings, integers, etc. when it comes to setting the parameter type.
>

The Action API is generally based around a "form" model, and submission of
complex data structures is generally discouraged. If you really need to do
so anyway, you might accept data as a JSON string, or possibly you might
use the "templated parameters" added in 1.32.

MediaWiki now (since 1.34) also has a REST API. There the convention is to
accept JSON data structures via POST or PUT, ideally validated against a
JSON Schema of some sort.


-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to