我目前正在尝试使这项工作:
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'));
$c->session('token')
我通过Mojolicious::Plugin::OAuth2获得的令牌在哪里。
我只得到一个空洞的回应。通过 curl 做同样的事情(我认为)可以:
curl -v -H "authorization: Bearer the_same_token_as_above" https://spreadsheets.google.com/feeds/spreadsheets/private/full
我究竟做错了什么?