403 Status (Forbidden) when PUT and DELETE using AJAX
问题 I've implemented a small REST API using JAX-RS (Jersey 2.0) and I'm using AJAX to call the API, GET and POST work fine but when I get to call any PUT or DELETE methods, all I get is the following error message: Failed to load resource: the server responded with a status of 403 (Forbidden) Here's an example of a DELETE method in Java: @Path("/deleteSomething") @DELETE @Consumes("application/json") public void delete(String json) throws ParseException { JSONParser parser = new JSONParser();