Use POST data in non-GET requests for RESTful API

Still, the query string params are preferred if they are supplied
in order to keep compatibility to the previous behavior.