In a REST API interface, should I explicitly check that the client used only the parameters used by the API, and return a HTTP 403 if a parameter the API doesn't know about was included in the request?
would in most cases give different results.
Recently, I had to add support for ES6. Given the lack of proper support for ES6 by Closure Compiler, I added YUI Compressor. Since this one doesn't have optimization levels, the call is now simply:
Following POLA, I have an impression that I can't let the callers use the API like this:
because they would expect a specific result, but get a different one. The solution would be to check for the presence of
level parameter in the URI and return a error message indicating that the parameter is not supported.
But I check for this specific parameter, why not checking for
lecel (a typo), or
optimize (a guess), or anything else?
Therefore, is the API expects parameters
c to be possibly included in the URI, what should be the response if the URI also contains