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?

1

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

You could use Postman or a similar tool to issue a DELETE request.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.