1. Domino REST
  2. Rest clients
  3. Request meta-data

Request meta-data

Every generated request carries a RequestMeta object. You can inspect it before sending, or inside interceptors and callbacks, to understand how a call was built and how Domino REST will dispatch it.

			@RequestFactory
public interface MoviesService {

    @Path("library/movies/:id")
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    Movie getMovie(@PathParam("id") String id);
}

MoviesService service = new MoviesService_RequestFactory().make();

service.getMovie("123")
        .onBeforeSend(request -> {
            RequestMeta meta = request.getRequestMeta();
            LOGGER.info("Calling {}", meta.getFullUrl());          // /library/movies/123
            LOGGER.info("Method: {}", meta.getMethod());           // GET
            LOGGER.info("Consumes: {}", meta.getConsumes());       // application/json
            LOGGER.info("Produces: {}", meta.getProduces());       // application/json
        })
        .send();

		

All annotations on the resource method are captured as meta parameters, so you can introspect @Path, @GET, @Consumes, @Produces, and any others, alongside the values supplied by request arguments.

Meta-data includes the request and response types, HTTP method, full path (with path and matrix parameters applied), headers, query parameters, consumes/produces, and the full set of meta parameters derived from annotations and argument values. This makes it easy to log or adjust behavior based on the exact call shape.

			service.getMovie("123")
        .onBeforeSend(request -> {
            RequestMeta meta = request.getRequestMeta();

            // Meta parameters reflect all annotations and arguments applied to the request
            meta.getMetaParameters().forEach(param ->
                    LOGGER.info("{} -> {}", param.getName(), param.getValue()));
        })
        .send();

		

We are a group of passionate people who love what we do

Donate & Support Us