{8.2.0-updated} @Header

The {@link oaj.http.annotation.Header @Header} annotation can be applied to arguments of @RemoteMethod-annotated methods to denote that they are header parameters on the request.

Example:

@Remote(path="/myproxy") public interface MyProxy { // Explicit names specified for HTTP headers. // pojo will be converted to UON notation (unless plain-text parts enabled). @RemoteMethod(path="/mymethod1") String myProxyMethod1(@Header("Foo") String foo, @Header("Bar") MyPojo pojo); // Multiple values pulled from a HeaderSupplier object. // Same as @Header("*"). @RemoteMethod(path="/mymethod2") String myProxyMethod2(@Header HeaderSupplier headerSupplier); // Multiple values pulled from a Map. // Same as @Header("*"). @RemoteMethod(path="/mymethod3") String myProxyMethod3(@Header Map<String,Object> map); // Multiple values pulled from a bean. // Same as @Header("*"). @RemoteMethod(path="/mymethod4") String myProxyMethod4(@Header MyBean myBean); }

Single-part arguments (i.e. those with name != "*") can be any of the following types:

Multi-part arguments (i.e. those with name == "*" or empty) can be any of the following types:

See the link below for information about supported data types in OpenAPI serialization.