| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <head> |
| <title></title> |
| </head> |
| <body> |
| |
| Send an HTTP POST |
| |
| <button name="btn1">Save Configuration Information</button> |
| |
| |
| <!--curl -H "Accept: text/plain" -X POST -d "key=dummy-key4&value=dummy-value&date=2012-09-21 04:09:56" http://localhost:7080/airavata-registry-rest-services/registry/api/save/configuration--> |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script> |
| <script> |
| $(document).ready(function(){ |
| |
| $('[name="btn1"]').click(function(){ |
| // $.post("http://localhost:7080/airavata-registry-rest-services/registry/api/save/configuration", |
| $.post("http://localhost:6060/airavata-registry-rest-services/registry/api/save/configuration", |
| { key: "dummy3", value: "value3" , date : "2011-10-22 00:00:00"} ,function(data,status){ |
| // TODO : REST api should send some response back in case of a successful invocation of service. |
| alert("Button 1 clicked !"); |
| }); |
| }); |
| }); |
| // alert("Data: " + data + "\nStatus: " + status); |
| </script> |
| |
| <br/> |
| <br/> |
| <br/> |
| |
| <button name="btn2">Save Host</button> |
| <!--curl -H "Accept: text/plain" -X POST -d "key=dummy-key4&value=dummy-value&date=2012-09-21 04:09:56" http://localhost:7080/airavata-registry-rest-services/registry/api/save/configuration--> |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script> |
| <script> |
| $(document).ready(function(){ |
| $('[name="btn2"]').click(function(){ |
| // $.post("http://localhost:7080/airavata-registry-rest-services/registry/api/hostdescriptor/save", |
| $.post("http://localhost:6060/airavata-registry-rest-services/registry/api/hostdescriptor/save", |
| { host: "<type:hostDescription xmlns:type="http://schemas.airavata.apache.org/gfac/type"><type:hostName>testHost1</type:hostName><type:hostAddress>aaaa</type:hostAddress></type:hostDescription"} ,function(data,status){ |
| // TODO : REST api should send some response back in case of a successful invocation of service. |
| // alert("Data: " + data + "\nStatus: " + status); |
| alert("Button 2 clicked !"); |
| }); |
| }); |
| }); |
| </script> |
| |
| |
| </body> |
| </html> |
| |