Issue Details (XML | Word | Printable)

Key: JAVAEETUTORIAL-99
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: rcervera
Reporter: rcervera
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
javaeetutorial

Customer example and curl - 303 status when DELETE should be 204 instead

Created: 13/Jun/12 05:20 PM   Updated: 12/Jul/12 11:22 PM   Resolved: 12/Jul/12 11:22 PM
Component/s: doc
Affects Version/s: 6.0.7-3
Fix Version/s: 6.0.7-4

Time Tracking:
Not Specified

Tags:
Participants: rcervera


 Description  « Hide

http://docs.oracle.com/javaee/6/tutorial/doc/gkoib.html#gkqjl

"To delete a customer record, use the following command:
curl -i -X DELETE http://localhost:8080/customer/Customer/1
A successful DELETE returns an HTTP Status: 303 status."

It looks like 303 in the text should be 204 instead, which is what we get when we run this example with curl. 204 is also the status expected when deleting on CustomerClient.java:

// Test the DELETE method
response = webResource.path("1").delete(ClientResponse.class);

logger.info("DELETE status: " + response.getStatus());
if (response.getStatus() == 204) { logger.info("DELETE succeeded (no content)"); } else { logger.info("DELETE failed"); }



rcervera made changes - 12/Jul/12 11:21 PM
Field Original Value New Value
Assignee rcervera [ rcervera ]
rcervera made changes - 12/Jul/12 11:21 PM
Status Open [ 1 ] In Progress [ 3 ]
rcervera added a comment - 12/Jul/12 11:22 PM

Replaced status code in the new writeup for the customer example.


rcervera made changes - 12/Jul/12 11:22 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
rcervera added a comment - 12/Jul/12 11:22 PM

Issue is now fixed.


rcervera made changes - 12/Jul/12 11:22 PM
Status Resolved [ 5 ] Closed [ 6 ]