in reply to Flickr::API and using a proxy

Have you tried without using a proxy? Does that change the error message?

Your error is that $ua->get() expects an URI, while the $api-> calls return something else. While Perl does try to guess your intents, you cannot simply paste together the synopses of different modules and expect them to work.

Replies are listed 'Best First'.
Re^2: Flickr::API and using a proxy
by zmerlinz (Novice) on Dec 08, 2006 at 15:20 UTC
    if i try with out the proxy, the dumper tells me that the connection was refused to www.flickr.com:80 so it does seem that it needs to be told about the proxy to get out to flickr.com

      Sorry - my first question was misleading then. Try print Dumper $response to see what actually gets returned from Flickr::API and then you should know why $ua->get() on that doesn't work.

        Here is the output from dumper
        Success: 0 Error code: 0 $VAR1 = bless( { 'success' => 0, 'tree' => undef, '_msg' => 'Can\'t connect to www.flickr.com:80 (conne +ct: Connection refused)', 'error_code' => 0, '_content' => '500 Can\'t connect to www.flickr.com:8 +0 (connect: Connection refused) ', 'error_message' => 'API returned a non-200 status cod +e (500)', '_headers' => bless( { 'client-warning' => 'Internal +response', 'client-date' => 'Fri, 08 Dec +2006 15:40:38 GMT', 'content-type' => 'text/plain' }, 'HTTP::Headers' ), '_rc' => 500, '_request' => bless( { '_content' => 'baz=quux&method +=flickr.test.echo&foo=bar&api_key=7d709a71710fa4b986f836053bcf0792', '_uri' => bless( do{\(my $o = +'http://www.flickr.com/services/rest/')}, 'URI::http' ), '_headers' => bless( { 'user-a +gent' => 'libwww-perl/5.805', 'conten +t-type' => 'application/x-www-form-urlencoded', 'conten +t-length' => 81 }, 'HTTP: +:Headers' ), 'api_method' => 'flickr.test.e +cho', '_method' => 'POST', 'api_args' => { 'baz' => 'quux +', 'method' => 'f +lickr.test.echo', 'foo' => 'bar' +, 'api_key' => ' +' #removed the key } }, 'Flickr::API::Request' ) }, 'Flickr::API::Response' );