gideondsouza has asked for the wisdom of the Perl Monks concerning the following question:
So I'm doing a POST request to github as part of an OAuth web flow authentication. (This is part of a sub in a Dancer app).
I use LWP::UserAgent::post() and the docs I linked to seem to say that method will return a HTTP::Response object. But I get a weird type.
When I send a post to github for the access_token is where I have a slight problemo:
my $code = params->{'code'}; my $browser = LWP::UserAgent->new; my $resp = $browser.post('https://github.com/login/oauth/access_token' +, [ client_id =>'<my client id>' client_secret => '<my secret>', code => $code,#the code I got in the param state => '<some state>' ]); #HERE>>>>>>>>>>>>>>>>>>>> # I cannot seem to figure what $resp is!?? #----- $resp->is_success doesn't work! return Dumper($resp);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP::UserAgent::post gives me an odd response
by gideondsouza (Pilgrim) on Dec 29, 2012 at 13:08 UTC | |
by NetWallah (Canon) on Dec 29, 2012 at 16:12 UTC |