Annotation Interface CookieParam


@Retention(RUNTIME) @Target(PARAMETER) public @interface CookieParam
Injects the value of an HTTP cookie into a handler method parameter.

Example:


 @HandleGet("/profile")
 public User getProfile(@CookieParam("auth_token") String token) { ... }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Cookie parameter name.
  • Element Details

    • value

      String value
      Cookie parameter name. If left empty, it defaults to the method parameter's name;
      Default:
      ""