On Thu, 19 Jun 2014 15:16:22 +0200, MZMcBride z@mzmcbride.com wrote:
Petr Bena wrote:
Can this parameter be anywhere in the url? for example api.php?action=query&assert=user&prop=blabla or does it need to be on a specific position, like token?
It can be anywhere after "api.php", but not anywhere in the URL. I don't believe any token requires a specific position in a URL.
Yeah… The API documentation mentions this, but I think it's wrong or at least misleading.
https://www.mediawiki.org/wiki/API:Edit#Token
"When passing this to the Edit API, always pass the token parameter last (or at least after the text parameter). That way, if the edit gets interrupted, the token won't be passed and the edit will fail."
I'm reasonably sure that the HTTP and HTTPS protocols are smart enough to recognize "cut off" requests, and that any servers whatsoever are smart enough to implement this behavior.