Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^6: How to make an HTTP request with an equivalent of curl's --max-time?

by blindluke (Hermit)
on Jan 14, 2015 at 09:31 UTC ( [id://1113214]=note: print w/replies, xml ) Need Help??


in reply to Re^5: How to make an HTTP request with an equivalent of curl's --max-time?
in thread How to make an HTTP request with an equivalent of curl's --max-time?

The quote I posted comes from the Twitter documentation (that I linked to in my reply). This has nothing to do with the defaults of the LWP module. The value specified by the streaming API is 90 seconds. I have not written a single word in this thread about LWP and the default values it uses for its options.

- Luke

  • Comment on Re^6: How to make an HTTP request with an equivalent of curl's --max-time?

Replies are listed 'Best First'.
Re^7: How to make an HTTP request with an equivalent of curl's --max-time?
by Anonymous Monk on Jan 14, 2015 at 10:15 UTC

    The quote I posted ... obvious self evident things ..

    Yes, this is true, you have revealed the source of the OPs requirement, and I explained that LWP provides timeout to satisfy the requirement as laid out in those docs you quoted ... no real need for a max-time when a socket timeout is adequate

      There is very little "explanation" in your reply, which (if your intention was to provide additional information / suggestions to the OP) should either be posted under the original post, or should simply state the fact that it is addressed to someone else that the author of the post you are replying to.

      If you would take the time to read the docs I've linked to, you would notice that the OP probably needs both the maximum time and the socket timeout option. The latter will be needed to satisfy the API requirements, while the former could be necessary to satisfy OP's requirement to "manage the amount of data received by the script".

      Not everything is "obvious and self-evident", but taking the time to read the nodes you are replying to, and taking the time to make your replies clear in their meaning and relevant to the point would be a step in this direction.

      - Luke

        That is like a good idea

        Thanks for that explanation. Yes, it's true that I need both kinds of timeout. Currently I hold the connection open for 180 seconds which gives me 35-40 MB of tweets in a roughly 10,000-line file. If I wanted more, I'd increase that value. The other kind of timeout would presumably cause it to close down if the network or Twitter were having problems and I'd get nothing, but that's a different case.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2025-12-06 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (85 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.