Skip to content

Instantly share code, notes, and snippets.

@codahale
Created April 26, 2009 20:51
Show Gist options
  • Select an option

  • Save codahale/102170 to your computer and use it in GitHub Desktop.

Select an option

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