Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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