You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Bashiro <ba...@myway.com> on 2012/04/06 06:54:11 UTC
Base64
Hello,
Could anyone point to me any example of "how to" code Base 64 encoding using the HttpClient or HttpCore components
or using the commons codecs? I cannot find any example
Bashiro
Drammen-Norway
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: Base64
Posted by tommmmmm <to...@gmail.com>.
Base64 is done when you do basic authorization. So, when you set your
credentials and give basic authorization top priority you will see a header
like this being sent:
Authorization: Basic shfo34209ujasdja09dj23d9jdpsj#$Dasd
You can see all the headers by specifing logs to be debug level (see
google-> httpClient logs settings)
The encoding is done automatically by the HttpClient
Is it possible to get the encoded string before sending, if that's what you
want - I don't know. Try getting all the headers/params of the request and
iterate through them to look for "Authorization" header.
On 6 April 2012 06:54, Bashiro <ba...@myway.com> wrote:
> Hello,
> Could anyone point to me any example of "how to" code Base 64 encoding
> using the HttpClient or HttpCore components
> or using the commons codecs? I cannot find any example
>
> Bashiro
> Drammen-Norway
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>
--
Tomasz P.