Resteasy/JAX-RS URL Encoding @PATH
I am trying to build a client for a restful webservice with Resteasy. The issue is with my client code(below)
@Path("solr")
public interface TestClient{
@GET
@Path(value="select?indent...")
开发者_如何学Python @Produces("application/xml")
ClientResponse<String> getStuff();
}
The problem is that the ?
in the @Path
annotation is automatically URL encoded to a %3F
. This is in keeping with the javadocs here, but it's causing me to get 404 errors. I tried overriding this with the encode=false
here but that just creates compiler errors. Is there a way to override or escape this?
Why do you think you need a ?
in the Path? It seems like @QueryParam
is what you'd want instead. See http://docs.jboss.org/resteasy/docs/1.0.1.GA/userguide/html/RESTEasy_Client_Framework.html
精彩评论