Skip to content

Instantly share code, notes, and snippets.

@gerrymclarnon
Created December 17, 2012 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerrymclarnon/4318215 to your computer and use it in GitHub Desktop.
Save gerrymclarnon/4318215 to your computer and use it in GitHub Desktop.
MyResource.java
package net.playermanager.examples;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
/** Example resource class hosted at the URI path "/myresource"
*/
@Path("/myresource")
public class MyResource {
/** Method processing HTTP GET requests, producing "text/plain" MIME media
* type.
* @return String that will be send back as a response of type "text/plain".
*/
@GET
@Produces("text/plain")
public String getIt() {
return "Hi there!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment