Skip to content

Header parameters

Ahmad K. Bawaneh edited this page Feb 16, 2020 · 2 revisions

Header Parameters

Domino-rest can map method argument to request headers using the @HeaderParam annotation.

@RequestFactory
public interface MoviesService {

    @Path("library/movies/{name}")
    @GET
    Movie getMovieByName(@HeaderParam("name") String movieName, @HeaderParam("token") String requestToken);
}

When the request is sent the it will have a header token with the value being the value of the requestToken argument value.