Created
August 12, 2009 22:13
-
-
Save semifor/166817 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Accessing the HTTP::Response object on successful Net::Twitter API calls | |
use warnings; | |
use strict; | |
use Net::Twitter; | |
my $nt = Net::Twitter->new(netrc => 1, legacy => 0); | |
my $response; | |
$nt->ua->add_handler(response_done => sub { $response = shift }); | |
my $r = $nt->user_timeline({ count => 1 }); | |
warn $response->headers->as_string, "\n"; | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment