org.cruxframework.crux.core.shared.rest.annotation
Annotation Type FormParam


@Target(value={PARAMETER,METHOD})
@Retention(value=RUNTIME)
public @interface FormParam

Used to map a REST method parameter to a form parameter on the HTTP request

See the following example:

 ..
 @GET
 @Path("test")
 public String testOperation(@FormParam("param") String value) {
    return null;
 }
 

The form parameter "param" will be bound to the value parameter when processing this method invocation.

Author:
Thiago da Rosa de Bustamante

Required Element Summary
 String value
          Defines the name of the form parameter whose value will be used to initialize the value of the annotated method argument.
 

Element Detail

value

public abstract String value
Defines the name of the form parameter whose value will be used to initialize the value of the annotated method argument. The name is specified in decoded form, any percent encoded literals within the value will not be decoded and will instead be treated as literal text. E.g. if the parameter name is "a b" then the value of the annotation is "a b", not "a+b" or "a%20b".



Copyright © 2015. All rights reserved.