> Note that the header call returns a new object that you have to use,
> it doesn't seem to modify the existing one.
Indeed that was it. Using the returned object worked - thanks!
Bill
Martin Probst wrote:
> It works for me like this:
>
> resource.header(HttpHeaders.AUTHORIZATION, "Basic "
> + new String(Base64.encode("user:password"),
> Charset.forName("ASCII"))).get(...);
>
> Note that the header call returns a new object that you have to use,
> it doesn't seem to modify the existing one.
>
> There is also HTTPBasicAuthFilter but that had a bug that was only
> recently fixed on trunk.
>
> Martin
>
> On Fri, Jul 10, 2009 at 10:26, Bill de hOra<bill_at_dehora.net> wrote:
>> Is there a way to set an Authorization header using the jersey client? I
>> using the WebResource.header() call, but it doesn't appear to get sent
>>
>> Bill
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>