Last modified: 2013-02-05 18:07:30 UTC
The MediaWiki API has a "none" format. I don't understand its purpose. I vaguely remember researching this format and not being able to find a good reason for its existence. I believe it should be removed. It currently masks errors, e.g. <https://en.wikipedia.org/w/api.php?action=query&invalidparameter=masked&format=none>.
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=commit;h=b69da9ad53743b9e66123d8363e26902e719ec80 That's the relevant commit. I'm unable to find an associated Gerrit changeset or CodeReview revision, however.
The idea behind format=none is not to waste CPU to build and bandwidth to send the response when the caller is not using the response in any way.
(In reply to comment #2) > The idea behind format=none is not to waste CPU to build and bandwidth to > send the response when the caller is not using the response in any way. Is there a relevant bug about this? I'm still having difficulty understanding why anyone would ever want MediaWiki to return nothing.
Initially it was the Interlanguage extension that was, upon update on the central wiki, purging pages on client wikis, and didn't look at results. (Because if there was an error during the purging, what will you do? Purge again? It will happen eventually anyway.) Back when Wikibase extension was started it was discussed that it might use a similar mechanism, so I added this. I don't know of anything using it at the moment, but I would say that there may be more people who purge something and don't care about results.
If someone wants to see errors, they shouldn't be using format=none. But if they're really not caring about the result of their submission, we may as well allow the option to save a few bytes and a few cycles. Closing as WONTFIX.
Do other APIs have a similar output option? It's not a feature I'm familiar with.
I'm unconvinced we're really saving enough trees here to make it worthwhile, suggest reopening.