How to setup path parameter in RESTeasy client

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.

Answers


You can see the answer here Case-insensitive URLs with JAX-RS : No There this also the attached RFC to this rule


Need Your Help

CSS navigation background

html css css3

I am trying to make a custom CSS navigation for my website but I have some problems you can find the code sniped bellow.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.