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


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

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

See the following example:

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

The header "header" 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 HTTP header whose value will be used to initialize the value of the annotated method argument, class field or bean property.
 

Element Detail

value

public abstract String value
Defines the name of the HTTP header whose value will be used to initialize the value of the annotated method argument, class field or bean property. Case insensitive.



Copyright © 2014. All rights reserved.