Skip to main content

[jsr339-experts] Re: Desired behavior of UriBuilder.fromResource

  • From: "Markus KARG" <markus@...>
  • To: <jsr339-experts@...>
  • Subject: [jsr339-experts] Re: Desired behavior of UriBuilder.fromResource
  • Date: Thu, 8 Nov 2012 19:48:25 +0100
  • Organization: HeadCrash

> Suppose I have:
> 
> @Path("customer/{id}")
> public class CustomerResource {
> 
> 
> When I use UriBuilder.fromResource(CustomerResource.class)
> 
> The builder creates a URI, %-encoding the { and } in the path.
> 
> This sort feels both, wrong and correct :-)
> 
> Question: what is the desired behavior?

The above code is not creating an URI, it is creating an URIBuilder.

To create an URI you must invoke build("MyID") on this URIBuilder, which
creates an URI that looks like "customer/MyID".

If that is not produced by your software, then it is definitively wrong and
you should file a ticket.

Regards
Markus



[jsr339-experts] Desired behavior of UriBuilder.fromResource

Jan Algermissen 11/08/2012

[jsr339-experts] Re: Desired behavior of UriBuilder.fromResource

Markus KARG 11/08/2012

[jsr339-experts] Re: Desired behavior of UriBuilder.fromResource

Jan Algermissen 11/08/2012
 
 
Close
loading
Please Confirm
Close