Skip to content

Instantly share code, notes, and snippets.

@stain
Created March 27, 2013 16:41
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 stain/5255833 to your computer and use it in GitHub Desktop.
Save stain/5255833 to your computer and use it in GitHub Desktop.
@GET
@Path("hello/{name}")
@Produces("text/plain")
public Response hello(@PathParam("name") String name) {
String greeting = "Hello, " + name + "\n";
ResponseBuilder responseBuilder = Response.ok().entity(greeting);
return responseBuilder.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment