is the error message correct here?
the method is not valid because of the trailing space, right ? If YES then the error message should also have the trailing space. Event better wrap the HTTP method name in quotes, e.g. "Unsupported HTTP method: 'get '"