Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by Your Mother (Archbishop)
on Aug 17, 2017 at 15:48 UTC ( [id://1197569]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-20 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found