SpaceApi/validator

GET to API endpoints should return "405 method not allowed"

Opened this issue · 0 comments

dbrgn commented

When doing a GET request to https://validator.spaceapi.io/v2/validateJSON or https://validator.spaceapi.io/v2/validateURL, a HTTP "404 not found" response is returned. A RESTful service should return "405 method not allowed" instead.

(In theory every unsupported method should return a HTTP 405, but if that's too complicated to do, simply returning 405 to a GET request for those two endpoints would already improve usability/discoverability of the API. I opened the endpoint in the web browser and was confused to get a 404 back 🙂)