Welcome to Tiny REST wiki!
Tiny REST is a small Java based REST server that allows a Java programmer to easily create a REST server. A new server can be created by simply copying a sample project class and implement a handler class. This should not take more than 5 minutes. The server can use reflection to make public functions in a handler class available as HTTP REST functions. The simplest way to write a function is to take a single RestRequest argument. The request object provides the programmer with easy access to the HTTP query and header and also provides methods to write back responses to the output stream. POST bodies can be parsed automatically and there are methods to format objects as HTTP content as well.
The only required library is log4j which is distributed under the Apache Licence 2.
A service can easily be created using the Java Service Wrapper from Tanuki Software for which there are commercial and community editions available.
Download the source and have a look at the example package. It provides you with sample code to create a service. By simply taking out the reference to WrapperListener and @Override annotations, you can run the example as a stand alone application without having the service wrapper library.
The example provides methods that shows how to do GET and POST with text and xml.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="SWKNDKAQSR5M4">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
If you find this project at all helpful, please contribute 5 USD to help us improve the product.