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.
Only use POST params in non-GET request.
Merge pull request #1435 from eugenk/1424-use_post_data

Use POST data in non-GET requests for RESTful API