I am using jersey as my restful api implementation. In the front end, I am using angularjs $http service to make http request. When I request a delete method I always got be
After some testing, I found the solution. I put the allow method on the header as below, then it works. I don't know why "*" doesn't work.
headers.add("Access-Control-Allow-Methods", "GET, POST, OPTIONS, PUT, DELETE");