0

Below is my method to delete and return a string, simple and straightforward

@RequestMapping(value = "/deletetest", method = RequestMethod.DELETE)
    @ResponseBody
    public String DeleteUser() {
        return "something";
    }

But I go Get method not supported, which is weird since i state that my method = RequestMethod.DELETE enter image description here

Any insight?

yongchang
  • 503
  • 6
  • 18

1 Answers1

3

If you set an endpoint to RequestMethod.DELETE the endpoint will only accept a HTTP DELETE request. Your browser issues a GET request.

Hopey One
  • 1,681
  • 5
  • 10