Reputation: 1310
I have used RESTeasy for server and client. Client shares 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();
But I want to have path case insensitive, so I fake path parameter with regular expression in it:
public interface Service {
@Path("/{start:[Ss]tart}")
@GET
void start();
}
Now client ProxyFactory doesn't know value for substitution path parameter {start}
and doesn't do any substitution 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);
}
How can I specify value for fake path parameter in RESTeasy client?
Thanks.
Upvotes: 4
Views: 4416
Reputation: 1394
You can see the answer here Case-insensitive URLs with JAX-RS : No There this also the attached RFC to this rule
Upvotes: 0