Media wiki second POST still returns NeedToken result
问题 After first POST request I get "NeedToken" result then in my second POST request I pass token and sessionid as parameters. Here is my Javascript code: function wiki_auth(login, pass, ref){ $.post(ref+'api.php?action=login&lgname=' + login + '&lgpassword=' + pass + '&format=json', function(data) { if(data.login.result == 'NeedToken') { $.post(ref+'api.php?action=login&lgname=' + login + '&lgpassword=' + pass + '&lgtoken='+data.login.token+'&format=json&sessionid='+data.login.sessionid+'