Skip to content

Instantly share code, notes, and snippets.

@codahale
Created April 26, 2009 20:51
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 codahale/102170 to your computer and use it in GitHub Desktop.
Save codahale/102170 to your computer and use it in GitHub Desktop.
@Path("/hello")
@Produces(MimeType.TEXT_PLAIN)
public class HelloResource {
@GET
public Response sayHello(@DefaultValue("stranger") @QueryParam("name") String name) {
return Response.ok("Hello, " + name).build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment