Created
October 16, 2009 11:39
-
-
Save hiroyukim/211757 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
use HTTP::Request::Common 'POST'; | |
my @file_paths = @ARGV; | |
my $user_id = q{}; | |
my $passwd = q{}; | |
my $ua = LWP::UserAgent->new; | |
$ua->credentials( 'api.wassr.jp:80', 'API Authentication', $user_id, $passwd, ); | |
my $res = $ua->request( | |
POST('http://api.wassr.jp/statuses/update.json', | |
Content_Type => 'form-data', | |
Content => { | |
status => 'test', | |
image => \@file_paths, | |
}, | |
) | |
); | |
warn $res->content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment