You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Suppose you created a new API but when you test it you get a 405 status response like this:

{
    "type": "about:blank",
    "title": "Method Not Allowed",
    "status": 405,
    "instance": "http://127.0.0.1/api/customers"
}

This most likely means you forgot to select at least one HTTP method:

If you are testing from a browser then you must enable the GET method. If you are using an API testing tool, then you can enable any HTTP method appropriate for the API. Either way, whenever an unsupported HTTP method is used, the expected response is 405 Method Not Allowed.

  • No labels