bots using this library hit my site much harder than the perl or python equivalents, due to the use of a POST for requests that could be done with a GET.
Interesting. I was under the impression that POST was required, but looking at the current documentation that doesn't seem to be the case, although many request types (login, edit, etc) do require POST. Will try to find the list and switch at least query operations to GET.
Thanks for looking into it.
my site is http://www.snpedia.com and we get a LOT bot traffic. Varnish cashing saves the day, but can only help with GETs not POSTs.
http://pywikipediabot.sourceforge.net/ does GETs naturally.
http://search.cpan.org/~exobuzz/MediaWiki-API-0.27/lib/MediaWiki/API.pm have both been changed to use GET where possible.
I've started to see incoming from your library, and figure the sooner this change gets out there, the sooner many mediawiki sites will benefit.
I assume get requests are used where they logically should, for information retrieval. And posts for login / editing.
I will see if I can make the necessary changes this week, but if you have a list it would make it a lot easier.
Jools Wills seems to be well informed on this issue, as he did the fix for the perl libs
his contact info is accessible from
Simply using get for all action=query requests and post for everything else should solve 95% of the issue. I'm traveling at the moment, but will try to take a crack at this next week if you don't beat me to it.
I was working on it last night in bed but couldn't get the specs to run (at all). I had to re-compile 1.9.2 but I will try again tonight.
I was planning on snooping on the action as well.
I don't see a open-ended method in RestClient however where the type can be specified.
the get and post requests are just wrappers for Request.execute(:method => method, :url => url, :headers => headers, &block) so it may be easier to just use that instead of RestClient.get/post
Just sharing what I have looked at. Again I will try again tonight if I can the specs running.
Sadly, this issue remains unresolved. If anyone does address it, it might be wise to consider a related issue illustrated in
Semantic-Mediawiki now exposes 2 new actions in api.php named 'ask' and 'askargs'. It would be good if they could also be accessed via GETs instead of POSTs, and perhaps the fix for this issue could anticipate that.
Use GET for all action=query requests (#24)
It's been a long time coming, but this should finally be fixed in 0.5.0: all action=query requests now use GET.
Re: those new Semantic Mediawiki actions, they're not supported by mediawiki-gateway at the moment, so the flavor of request to use is a bit of a moot issue.