Uploaded image for project: 'Nuxeo Java Client'
  1. Nuxeo Java Client
  2. JAVACLIENT-133

Cannot execute a DELETE, PUT or POST request with an empty body

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: API
    • Tags:
    • Story Points:
      2

      Description

      Let's say I need to perform a simple delete on a given path without sending any JSON data, calling NuxeoClient#delete(String url, String json) with json=null will always execute a GET request, see https://github.com/nuxeo/nuxeo-java-client/blob/master/nuxeo-java-client/src/main/java/org/nuxeo/client/api/NuxeoClient.java#L293

      Workaround: pass "" as the json parameter.
      Maybe we should provide an extra API: NuxeoClient#delete(String url)?

      Same for PUT and POST, though I'm not sure if executing these methods with an empty body is a real use case.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: