in reply to Re^3: Not sure how to use HTTP::Tiny
in thread Not sure how to use HTTP::Tiny

I get the same result (401) with my $headers = { Accept => "application/json", 'Content-Type' => "application/json", Authorization => "Authorization: Basic ".encode_base +64("user:password") };

Replies are listed 'Best First'.
Re^5: Not sure how to use HTTP::Tiny
by poj (Abbot) on May 21, 2018 at 20:50 UTC

    Try

    use MIME::Base64; my $headers = { Accept => "application/json", 'Content-Type' => "application/json", Authorization => "Basic ".encode_base64("user:password"), };
    poj

      i was building the whole raw line in my tkx code, and i kinda forgot what the key part would do for me in the header section, sorry

        excellent! That worked. It's hard to find documentation on what exactly to put in for Authorization, or I just missed it. Thanks!