| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8" />
- <script lang="text/javascript">
- //GET
- function m_get( url ) {
- send_get_request( url );
- }
- //POST
- function m_post() {
- send_post_request( url );
- }
- //PUT
- function m_post() {
- send_put_request( url );
- }
- //DELETE
- function m_delete() {
- send_delete_request_as_url( url );
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////
- $(document).ready(function() {
- $('#get').click(function() {
- send_get_request( $("#url").val() );
- });
- $('#post').click(function() {
- send_post_request( $("#url").val() );
- });
- $('#put').click(function() {
- send_put_request( $("#url").val() );
- });
- $('#delete').click(function() {
- send_delete_request( $("#url").val() );
- });
- });
- </script>
- </head>
- <body>
- <div style="float: left; width: 720px;">
- <div style="width: 100%;">
- <table border="1" style="width:100%">
- <tr>
- <td>URL:</td>
- <td><input type="text" id="url" style="width:95%" placeholder="../jaxrs/forum/"/></td>
- </tr>
- <tr>
- <td>type:</td>
- <td>
- 通用REST服务调用
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <button id="get">GET</button>
- <button id="post">POST</button>
- <button id="put">PUT</button>
- <button id="delete">DELETE</button>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <textarea id="content" style="width:97%;height:300px">{}</textarea>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <textarea id="result" style="width:97%;height:400px"></textarea>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </body>
- </html>
|