javaeetutorial
  1. javaeetutorial
  2. JAVAEETUTORIAL-99

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.7-3
    • Fix Version/s: 6.0.7-4
    • Component/s: doc
    • Labels:
      None

      Description

      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");
      }

        Activity

        Hide
        rcervera added a comment -

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

        Show
        rcervera added a comment - Replaced status code in the new writeup for the customer example.
        Hide
        rcervera added a comment -

        Issue is now fixed.

        Show
        rcervera added a comment - Issue is now fixed.

          People

          • Assignee:
            rcervera
            Reporter:
            rcervera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: