Created
December 17, 2012 13:18
-
-
Save gerrymclarnon/4318215 to your computer and use it in GitHub Desktop.
MyResource.java
This file contains 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
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