segler-alex / radiobrowser-api

radio browser server api
GNU Affero General Public License v3.0
73 stars 15 forks source link

RewriteRules: Append existing query string, GET requests with additional parameters #20

Open indr opened 7 years ago

indr commented 7 years ago

The rewrite rules in .htaccess for accessing the API discard the existing query string [0]. Parameters like limit, offset, order, reverse and hidebroken don't work for GET requests, as the API description implicitly states:

This parameters can be added by using a HTTP POST request with the encoding "x-www-form-urlencoded" instead of GET request. The parameters can also be sent with encoding "application/json" that is used for example by Angular.js

What was the reason to drop the existing query string, or make additional parameters only available for POST requests and therefore make it impossible to issue simple and cache-able GET requests?

[0] See flags QSA, QSD https://httpd.apache.org/docs/2.4/rewrite/flags.html


Awesome service by the way. Thank you very much @segler-alex 🙏