I use RESTeasy for server and client. Client shares this service interface with server:
public interface Service { @Path("/start") @GET void start(); }
Implementation of this service is bound to path /api, so method start() is accessible on full path /api/start. On client side is code pretty straightforward:
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
Service service = ProxyFactory.create(Service.class, "http://server/api");
service.start();
I want to have path case insensitive, so I use fake path parameter with regular expression in it:
public interface Service { @Path("/{start:[Ss]tart}") @GET void start(); }
Now ProxyFactory on client doesn't know value for substitution path parameter
{start}and client ends with exception "You did not supply enough values to fill path parameters". But when i try to use path parameter as method argument, it works.
public interface Service { @Path("/{start:[Ss]tart}") @GET void start(@PathParam("start") String param); }
There is no simple solution for handling those fake path parameters in RESTeasy client, or I missed something? Thanks.