As I said, you cannot just simply type that URL in a browser and hit enter for POST, PUT and DELETE method requests. When you type a URL into a browser, it executes an HTTP GET request. You need to execute an HTTP DELETE request. This is why I recommended downloading the Rest Console plugin so that you can test the APIs that you cannot exercise with normal GET requests (meaning, typing them into a browser). The other HTTP methods will never ever work if you just type the URL into the browser and hit enter.
If you are using Apache's HttpClient, you have to do something like:
Code: Select all
HttpClient client = new HttpClient();
HttpMethod method = new DeleteMethod("localhost:8080/restapi/cart/items/954");
client.execute(method);