NAME
Furl::HTTP::OAuth - Make OAuth 1.0 signed requests with Furl
SYNOPSIS
my $client = Furl::HTTP::OAuth->new(
consumer_key => '<your consumer key>',
consumer_secret => '<your consumer secret>',
token => '<your token>',
token_secret => '<your token secret>',
signature_method => 'HMAC-SHA1', # the default
# accepts all Furl::HTTP->new options
agent => 'MyAgent/1.0',
timeout => 5
);
my ($version, $code, $msg, $headers, $body) = $client->get('http://test.com');
($version, $code, $msg, $headers, $body) = $client->put('http://test.com');
($version, $code, $msg, $headers, $body) = $client->post('http://test.com');
# OR...
($version, $code, $msg, $headers, $body) = $client->request(
# accepts all Furl::HTTP::request options
method => 'GET',
url => 'http://test.com',
);
DESCRIPTION
The goal of this module is to provide a simple interface for quickly signing and sending HTTP requests using OAuth 1.0 and Furl. You should be at least somewhat familiar with OAuth 1.0 and Furl before using this module.
METHODS
request
See Furl's request method
get
See Furl's get method
post
See Furl's post method
put
See Furl's put method
delete
See Furl's delete method
ATTRIBUTES
consumer_key (String)
Your OAuth consumer key
consumer_secret (String)
Your OAuth consumer secret
token (String)
Your OAuth token
token_secret (String)
Your OAuth token secret
signature_method (String)
Either 'HMAC-SHA1' (default) or 'PLAINTEXT'
nonce (Coderef)
The default is a coderef which returns an eight character string of random letters
timestamp (Coderef)
The default is a coderef which returns time()
furl (Furl::HTTP)
Underlying Furl::HTTP object. Feel free to use your own.
SEE ALSO
Furl::HTTP, OAuth RFC, https://hueniverse.com/oauth/guide/workflow/
LICENSE
(c) 2016 ascra
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.