Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-366

REST end-points need to support DELETE and PUT

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.M5
    • Component/s: site
    • Labels:
      None

      Description

      DELETE is failing on all end-points with a 405 Method not Allowed error. The response header says that only POST, GET, OPTIONS and HEAD are allowed so I assume PUT won't work either but I have not tested that

        Gliffy Diagrams

          Activity

          Hide
          kborchers Kris Borchers added a comment -

          I have just verified that PUT also fails with a 405

          Show
          kborchers Kris Borchers added a comment - I have just verified that PUT also fails with a 405
          Hide
          abstractj Bruno Oliveira added a comment - - edited

          Could you please test it? https://github.com/aerogear/TODO/commit/ecd641e4895592b4126b8f7de844bf6d4221c6e8

          I did some tests with:

          curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '

          {"title": "test", "style":"mydescription"}

          ' http://localhost:8080/todo-server/rest/project/
          curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/rest/project/
          curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '

          {"title":"test","style":"BROdescription"}

          ' http://localhost:8080/todo-server/rest/project/1

          for i in

          {1..10}

          do

          curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '

          {"title":"test","style":"$i-description"}

          ' http://localhost:8080/todo-server/rest/project/1

          done

          curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/rest/project/

          Optimistic locking is not a requirement for us currently, of course we need to think about it in the future.

          Show
          abstractj Bruno Oliveira added a comment - - edited Could you please test it? https://github.com/aerogear/TODO/commit/ecd641e4895592b4126b8f7de844bf6d4221c6e8 I did some tests with: curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title": "test", "style":"mydescription"} ' http://localhost:8080/todo-server/rest/project/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/rest/project/ curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d ' {"title":"test","style":"BROdescription"} ' http://localhost:8080/todo-server/rest/project/1 for i in {1..10} do curl -v -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d ' {"title":"test","style":"$i-description"} ' http://localhost:8080/todo-server/rest/project/1 done curl -v -H "Accept: application/json" -H "Content-type: application/json" -X GET http://localhost:8080/todo-server/rest/project/ Optimistic locking is not a requirement for us currently, of course we need to think about it in the future.

            People

            • Assignee:
              abstractj Bruno Oliveira
              Reporter:
              kborchers Kris Borchers
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development