Created
June 15, 2009 16:27
-
-
Save kga/130200 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/env perl | |
use strict; | |
use warnings; | |
use Perl6::Say; | |
use YAML; | |
use Config::Pit; | |
use LWP::UserAgent; | |
use HTTP::Request::Common; | |
use utf8; | |
my $conf = pit_get('hatenabookmark-webhook', require => { | |
url => 'webhook-url', | |
key => 'webhook-key', | |
}); | |
my $ua = LWP::UserAgent->new; | |
my $res = $ua->request(POST $conf->{url}, [ | |
status => 'star', | |
key => $conf->{key}, | |
'username' => 'KGA', | |
'title' => 'こんにちはこんにちはエントリ', | |
'url' => 'http://www.google.com/', | |
'color' => 'blue', | |
'quote' => 'quote', | |
'timestamp' => '1994-11-05T08:15:30-05:00', | |
]); | |
say Dump $res->headers; | |
say $res->content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment