[wp-hackers] Checking plugin version
mike at newclarity.net
Sat Sep 22 22:22:52 UTC 2012
On Sep 22, 2012, at 8:02 AM, Otto <otto at ottodestruct.com> wrote:
> While that works, I cannot guarantee that it will continue to work in
> the future. It's not the way the WordPress core itself uses to talk to
> the API server.
> You should be doing an HTTP POST to: http://api.wordpress.org/plugins/info/1.0/
> The parameters in the body of the POST for the plugin info request should be:
> 'action' = 'plugin_information'
> 'request' = PHP serialized version of array('slug'=>'whatever')
Hmm. Why would you move away from a resource-oriented API using idempotent and HTTP-cacheable GET and towards an RPC-approach that uses HTTP POST if you are not trying to explicitly support a well-known interface like XMLRPC? Minimally it makes consuming the API that much harder.
I've been following the API Craft Google group recently and the API Evangelist blog and they've got some really experienced web API developers on the list, and I'm pretty sure they would count moving from resource-oriented GET to an RPC-oriented POST as a major step backwards. Minimally moving in that direction means it won't be easy (possible?) to leverage some of the new and upcoming client and server tools for consuming, testing, monitoring, support and analyzing the API, things like what you can find here and here.
I know you frequently dislike what many others view are best practices in selected areas but what's the benefit of this move away from HTTP GET? I can't see it.
More information about the wp-hackers