0

I am using quarkus resteasy-reactive and setting up clients declaratively.

I need to put base64 (which works fine as URL path segments) data into the path but the / chars get encoded into %2F causing the receiving application to fail parsing the data.

This PR: https://github.com/resteasy/resteasy/pull/945/files seems to allow @PathParam annotated client arguments to be annotated as @Encoded in order to deactivate their url encoding. But trying to use this in quarkus with resteasy-reactive seems to break. The below client definition will always encode / to %2F, whether @Encoded is there or not.

@RegisterRestClient(configKey = "urlpreview")
interface UrlPreviewClient {

  @GET
  @Path("/{b64url}.jpg")
  fun getImage(@Encoded b64url: String): Response
}

I also tried the following client declarations:

@GET
@Path("/{b64url}.jpg")
fun getImage(b64url: String): Response
@GET
@Path("/{b64url}.jpg")
fun getImage(@PathParam("b64url") @Encoded b64url: String): Response
@GET
@Path("/{b64url:.*}.jpg")
fun getImage(@PathParam("b64url") @Encoded b64url: String): Response

All encode / chars in b64url as %2F.

0 Answers0