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);
}
|