I am currently trying to make this work:
my $ua = Mojo::UserAgent->new;
my $req = Mojo::Message::Request->new;
my $tx = $ua->build_tx(GET => 'https://spreadsheets.google.com/feeds/spreadsheets/private/full');
app->log->info($c->session('token'));
$tx->req->headers->authorization('Bearer ' . $c->session('token'));
where $c->session('token')
is the token I got via Mojolicious::Plugin::OAuth2.
I only get back an empty response. Doing the same (I think) via curl works OK:
curl -v -H "authorization: Bearer the_same_token_as_above" https://spreadsheets.google.com/feeds/spreadsheets/private/full
What am I doing wrong?