users@jersey.java.net

[Jersey] Re: RequestURI vs AbsolutePath

From: Ted M. Young [_at_jitterted] <tedyoung_at_gmail.com>
Date: Thu, 6 Feb 2014 13:09:59 -0800

I don't think it's bad form, seems reasonable if you need properties from
both UriInfo and HttpHeaders. I wonder about doing that for "each method",
though, perhaps a filter is appropriate here (e.g., ContainerRequestFilter)?

;ted
--
http://about.me/tedmyoung
On Thu, Feb 6, 2014 at 12:44 PM, Robert DiFalco <robert.difalco_at_gmail.com>wrote:
> Thanks!
>
> While I've got you, I need to get the request URI as well as the
> x-forwarded-proto in a bunch of my REST server methods. Is it considered
> bad form to do a "@Context ContainerRequest request" and should I instead
> just do two context parameters in each method "@Context UriInfo info,
> @Context HttpHeaders headers"?
>
> Any thoughts?
>
>
>
> On Thu, Feb 6, 2014 at 12:21 PM, Ted M. Young [@jitterted] <
> tedyoung_at_gmail.com> wrote:
>
>> The Request URI includes any query parameters or fragments (#) segments.
>> The Absolute Path is the same, but does not include the query parameters
>> and fragments.
>>
>> ;ted
>> --
>> http://about.me/tedmyoung
>>
>>
>>
>> On Thu, Feb 6, 2014 at 12:07 PM, Robert DiFalco <robert.difalco_at_gmail.com
>> > wrote:
>>
>>> I need a little guidance here? I'm not sure I understand the difference
>>> between UriInfo#getAbsolutePathBuilder and UriInfo#getRequestUriBuilder.
>>> When would I use one over the other?
>>>
>>> TIA
>>>
>>
>>
>