in reply to Re: LWP::UserAgent non-blocking calls
in thread LWP::UserAgent non-blocking calls

Speed and parallel requests are not a requirement in my case. Basically, i need to start a transaction on a credit/debit card payment terminal. Most have a sane API where you just start a transactions, then poll every few seconds to see if there is a result for that transaction (accepted/rejected). This one company made the idiotic decision to go for long polls (with a 60 second transaction timeout), like it's 1995.

With a non-blocking HTTP client library, i can still simulate the standard behaviour. Marshall suggested HTTP::Async which, at first glance, seems to fit the bill (but i haven't tested it yet).

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
Also check out my sisters artwork and my weekly webcomics
  • Comment on Re^2: LWP::UserAgent non-blocking calls

Replies are listed 'Best First'.
Re^3: LWP::UserAgent non-blocking calls
by ikegami (Patriarch) on Oct 24, 2024 at 18:44 UTC

    Speed and parallel requests are not a requirement in my case

    But you want parallelism, and the three options I mentioned provide that. And there are again, plus a fourth:

    You didn't say what you are doing in parallel. You didn't say what event loop you are using. So it's hard to evaluate which option will work and which is best. Provide more information, and we can provide a more detailed answer.