Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created January 8, 2015 21:02
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 abhirockzz/af30788d785b7fe6341e to your computer and use it in GitHub Desktop.
Save abhirockzz/af30788d785b7fe6341e to your computer and use it in GitHub Desktop.
@Path("info/{tweeter}")
@GET
@Produces("application/json")
public Response getTweeterInfo(@HeaderParam("referrer") String refURL, @CookieParam("id") String id){
//use the injected values of refURL, id from header attribute called header and Cookie named id respectively
}
@Path("info/{tweeter}")
@POST
@Consumes("application/x-www-form-urlencoded")
public Response postInfo(@FormParam("tweeter_id") String id, @FormParam("tweeter_email") String email){
//use the injected values from HTML form attributes tweeter_id and tweeter_email
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment