jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-431

Jersey Client should support Delete with an Entity

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: ice box
    • Component/s: None
    • Labels:
      None

      Description

      It should be possible to do the following:

      Client client = ClientBuilder.newClient();
      WebTarget target = client.target(restURL);
      Response response = target.request().delete(Entity.text("payload"));

        Activity

        subodh_r created issue -
        Libor Kramolis made changes -
        Field Original Value New Value
        Tags jersey-client e/likra
        Libor Kramolis made changes -
        Comment [ What version of Jersey do you use. ]
        Hide
        Libor Kramolis added a comment -

        I guess it is intention to not have delete with entity method. You should just identify entity on server side by URI.

        From HTTP 1.1 spec:

        The DELETE method requests that the origin server delete the resource identified by the Request-URI.

        Show
        Libor Kramolis added a comment - I guess it is intention to not have delete with entity method. You should just identify entity on server side by URI. From HTTP 1.1 spec: The DELETE method requests that the origin server delete the resource identified by the Request-URI.
        Libor Kramolis made changes -
        Project jersey [ 10014 ] jax-rs-spec [ 11884 ]
        Key JERSEY-2113 JAX_RS_SPEC-431
        Hide
        Libor Kramolis added a comment -

        (Issue moved from JERSEY project.)

        Show
        Libor Kramolis added a comment - (Issue moved from JERSEY project.)
        Hide
        subodh_r added a comment -

        The spec does not explicitly prohibit it so maybe the API should not either?

        Also see related thread on stackoverflow: http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request/2074380#2074380

        Show
        subodh_r added a comment - The spec does not explicitly prohibit it so maybe the API should not either? Also see related thread on stackoverflow: http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request/2074380#2074380
        Marek Potociar made changes -
        Fix Version/s ice box [ 14716 ]
        Marek Potociar made changes -
        Affects Version/s 2.0 [ 14715 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            subodh_r
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: