Le dimanche 31 mai 2009 à 14:59 +0200, Alexandre Emsenhuber a écrit : > you can just add --post-data= to the command to make a POST with wget, > but parameters will stil be passed as a GET request (i.e. in the URL). > If you want to pass the as post data, then pass them in --post-data > with same format as a query string, e.g. --post- > data='param1=value1¶m2=value2' > > Cheers, > Alexandre Emsenhuber
Hello Alexandre, I dit what you said : wget --post-data='action=query&prop=info&intoken=move&titles=A%20B&format=xml' -O - 'http://localhost/~wiki/mediawiki/api.php' > T.xml I works, except that I got a warning which in fact is an error : <?xml version="1.0"?><api><query><pages><page pageid="221" ns="0" title="A B" touched="2009-05-31T16:34:48Z" lastrevid="448" counter="1" length="9" new="" starttimestamp="2009-05-31T17:22:43Z" /></pages></query> <warnings><info> Action 'move' is not allowed for the current user</info> </warnings></api> What can I do to tell wget which user is sending a request. I tried wget --post-data='user=colonna&password=...&action...&format=xml' -O - 'http://localhost/~wiki/mediawiki/api.php' > T.xml I still have : Action 'move' is not allowed for the current user Thanks for helping. Francois Colonna _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
