in reply to Re^2: LWP::UserAgent Get timing out after few request
in thread LWP::UserAgent Get timing out after few request

Is this a public API that any of us could play with or something closed or paid?

  • Comment on Re^3: LWP::UserAgent Get timing out after few request

Replies are listed 'Best First'.
Re^4: LWP::UserAgent Get timing out after few request
by sannag (Sexton) on Aug 17, 2017 at 16:07 UTC

    unfortunately it is an closed API (else I would have gladly posted the URL)...on another note I tried using the REST::Client instead of LWP::UserAgent and it worked that is it did not time out.

    sub getUserInfov { my($userId) = @_; my $userURI = 'https://xxx.com/api/m1/request/'. $partnerId. '/users/ + print $userURI, "\n"; my $client = REST::Client->new(); $client->addHeader('Authorization', $authHeaders); $client->GET($userURI); # my $userContent = decode_json( $client->responseContent()); # print Dumper($userContent); print 'Response: ' . $client->responseContent() . "\n"; print 'Response status: ' . $client->responseCode() . "\n"; foreach ( $client->responseHeaders() ) { print 'Header: ' . $_ . '=' . $client->responseHeader($_) . "\n"; } # return ($userContent); #sleep (3); }