On Aug 28, 2008, at 4:49 AM, Craig McClanahan wrote:
> In my client app, I found that I wanted to compose a resource URI
> with multiple "path" segments, like you can do with UriBuilder on
> the server side:
>
> // Call "foo/bar/baz" relative to this resource
> WebResource resource = ...;
> resource.path("foo").path("bar").path("baz").get(MyClass.class);
>
> But this does not work ... WebResource has a path() method, but
> WebResource.Builder does not. This seems like it would be very
> convenient, and pretty easy to add.
>
Yes, and for query parameters. Could you log an issue?
There is a uri method so you can do:
resource.uri(UriBuilder.fromPath("foo").path("bar"))
I wonder if it might be possible to do:
resource.uri().path("foo").path("bar").build().get(MyClass.class);
But, I want to avoid a merging of UriBuilder functionality directly
into RequestBuilder, and another permutation of methods sets on the
builder classes.
Paul.
> Craig
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>