Steps to replicate the issue (include links if applicable):
- Issue a POST request with ForeignRest, for example
const api = new mw.ForeignApi( 'https://en.wikipedia.org/w/api.php' ); const restApi = new mw.ForeignRest( 'https://en.wikipedia.org/w/rest.php', api ); api.getToken( 'csrf' ).then( ( token ) => { restApi.post( '/checkuser/v0/batch-temporaryaccount', { token: token, users: {} } ); } );
What happens?:
405 Method Not Allowed is returned. Looking into Network tab in DevTools suggests that the request was actually sent as GET.
What should have happened instead?:
The request should have been sent as POST.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):