Created
November 14, 2013 06:57
-
-
Save Madhuka/7462585 to your computer and use it in GitHub Desktop.
Simple REST app from Jaggery page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% | |
| var method = request.getMethod(); | |
| var name = request.getParameter("name"); | |
| var log = new Log(); | |
| switch(method) { | |
| case 'POST' : | |
| log.info('getting call over '+method); | |
| print('testing API with POST ' + name); | |
| break; | |
| case 'GET' : | |
| log.info('getting call over '+method); | |
| print('testing API with GET'); | |
| response.addHeader("customheader", "jaggery_response"); | |
| break; | |
| } | |
| %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment