Added a 405 response when using an invalid method.