Ah, thank you, Joel! What great info!!

On Mar 14, 2017 8:46 AM, "Joel Berger" <joel.a.ber...@gmail.com> wrote:

> While this answer may work, it isn't the truly correct answer. By default,
> encode_base64 adds linebreaks to the result. You don't want those and this
> is why chomp seems to work, but it won't if the text should ever become
> long enough to be on two lines. What you want (mentioned obliquely here:
> http://mojolicious.org/perldoc/Mojo/Util#b64_encode) is to use
> encode_base64 (or b64_encode) with an empty string as the second parameter.
>
> All that said, you don't even need to do this manually. If you add your
> username and password to the request url Mojo::UserAgent will just build
> this header for you. See the example here: http://mojolicious.org/
> perldoc/Mojo/UserAgent#SYNOPSIS
>
> Cheers,
> Joel
>
> On Monday, March 13, 2017 at 11:03:01 AM UTC-5, Todd wrote:
>>
>> That did fixed it.  Thank you!
>>
>> On Friday, March 10, 2017 at 4:26:52 PM UTC-7, Stefan Adams wrote:
>>>
>>>
>>> On Fri, Mar 10, 2017 at 4:12 PM, Todd <todd....@gmail.com> wrote:
>>>
>>>> my $auth = "Basic ".encode_base64($user.":".$pass);
>>>>
>>>
>>> I don't know why, but try this:
>>>
>>> chomp(my $auth = "Basic ".encode_base64($user.":".$pass));
>>>
>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to