3 Replies Latest reply: May 14, 2014 4:02 AM by Zack.L RSS

    How do I create a RESTFUL web service that uses a POST to update the database?

    John Ramuta-Oracle

      I need to create a RESTFUL service that will accept POST statements.  All I can find as examples are how to create a service that works with the GET to retrieve information, which I have successfully done.

       

      Now I need to send 3 parameters to the service, and create a new record with those 3 values.

       

      The code that I want to execute is:

       

      INSERT INTO TABLEA
      (ITEM1, ITEM2, ITEM3)
      VALUES
      (:value1, :value2, :value3)
      

       

      Pretty simple.  What I can't figure out is how to properly set up the URI Template to deal with those values.

       

      Anyone know of a good example that makes using POST clear?  Or should I be using PUT for this?

       

      And how do you then call the routine to test it?  Can I just put the URL in the browser address line, like I can to test a GET?  Or do I have to write another program to test it?