Skip to content

Instantly share code, notes, and snippets.

@ngs
Created October 8, 2010 21:43
Show Gist options
  • Select an option

  • Save ngs/617622 to your computer and use it in GitHub Desktop.

Select an option

Save ngs/617622 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
my $key = '25698347741e8e2333f076da';
my $secret = 'f0e582e668f551733cec3394';
my $url = 'http://gdd-2010-quiz-japan.appspot.com/oauth/25698347741e8e2333f076da';
use Data::Dumper;
use OAuth::Lite::Consumer;
my $consumer = OAuth::Lite::Consumer->new(
consumer_key => $key,
consumer_secret => $secret,
realm => q{devquiz},
site => q{http://api.example.org},
authorize_path => $url,
);
print Dumper $consumer->request(
url => $url,
params => { hello => 'world' }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment