You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an endpoint only supports specific http methods (e.g. POST), and the requested method is not supported (e.g. GET), return status 405 Method Not Allowed with a message similar to The requested resource does not support http method 'GET'.
Example
Api supports: POST to \customers
Request is for: GET to \customers
Current response is 400 Bad Request
{
"Error": {
"$type": "system._web._http._http_error",
"Code": "UnsupportedApiVersion",
"Message": "The HTTP resource that matches the request URI 'http://localhost/api/v1/customers' does not support the API version '1'.",
"InnerError": {
"$type": "system._web._http._http_error",
"Message": "No route providing a controller name with API version '1' was found to match request URI 'http://localhost/api/v1/customers'."
}
}
}
The endpoint does exist for version 1, but the method is incorrect. The current error is a bit misleading for the user.