Any MediawikiAPI GET requests works fine on both https://www.wikidata.org/w/api.php and https://wikidata.org/w/api.php, but POST requests only work with the www one. This creates a very difficult issue to debug -- everything works until at some point code tries to upload, at which point the API responds with a status=200 HTML (!) content of the main API help page.
I think POST requests to wikidata.org should result in some HTTP error with some text explaining the issue. For consistency with mwapi, MediaWiki-API-Error might also need to be set.