1. Domino REST
  2. Rest clients
  3. Custom URL

Custom URL

In some cases like when we work with HATEOAS links the request url isn't fixed and is received from the response of another rest request, and so using service root or Path mapping does not work, in this case we can leave the value for @Path annotation empty and use the request setUrl method to set the url, this method will override any other path mapping.

			@RequestFactory
public interface MoviesService {

    @Path("library/movies/:movieName")
    @GET
    Movie getMovieByName(@PathParam("movieName") String movieName);

    @Path("library/movies")
    @GET
    List<Movie> listMovies();

    @Path("library/movies/:name")
    @PUT
    @SuccessCodes({200})
    void updateMovie(@beanParam @RequestBody Movie movie);
}

		

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

Donate & Support Us