createconfig_rest.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <script lang="text/javascript">
  6. //GET
  7. function m_get(url) {
  8. send_get_request(url);
  9. }
  10. //POST
  11. function m_post() {
  12. send_post_request(url);
  13. }
  14. //PUT
  15. function m_put() {
  16. send_put_request(url);
  17. }
  18. //DELETE
  19. function m_delete() {
  20. send_delete_request_as_url(url);
  21. }
  22. /////////////////////////////////////////////////////////////////////////////////////////////////
  23. $(document).ready(function() {
  24. $('#get').click(function() {
  25. send_get_request($("#url").val());
  26. });
  27. $('#post').click(function() {
  28. send_post_request($("#url").val());
  29. });
  30. $('#put').click(function() {
  31. send_put_request($("#url").val());
  32. });
  33. $('#delete').click(function() {
  34. send_delete_request($("#url").val());
  35. });
  36. jQuery("#content").text('{"configname":"合作伙伴","configvalue":"合作伙伴","valuetype":"text","ordernumber":"2","description":"合作伙伴","baseconfigtype":"customer","parentconfigid":"15793b16-a301-473a-87dd-bca73083719c"}');
  37. });
  38. </script>
  39. </head>
  40. <body>
  41. <div style="float: left; width: 720px;">
  42. <div style="width: 100%;">
  43. <table border="1" style="width: 100%">
  44. <tr>
  45. <td>URL:</td>
  46. <td><input type="text" id="url" style="width: 95%" placeholder="../jaxrs/forum/" value="../jaxrs/baseconfig/create" /></td>
  47. </tr>
  48. <tr>
  49. <td>type:</td>
  50. <td>新增配置</td>
  51. </tr>
  52. <tr>
  53. <td colspan="2">
  54. <button id="post">POST</button>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td colspan="2"><textarea id="content" style="width: 97%; height: 300px">{}</textarea></td>
  59. </tr>
  60. <tr>
  61. <td colspan="2"><textarea id="result" style="width: 97%; height: 400px"></textarea></td>
  62. </tr>
  63. </table>
  64. </div>
  65. </div>
  66. </body>
  67. </html>