http://www.perlmonks.org?node_id=1010179


in reply to Wait for the response of API

Do you mean that the API-call returns before all the data is ready and available?

Perhaps the API has another call that tells you when the data is "ready"?

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^2: Wait for the response of API
by rkrish (Acolyte) on Dec 24, 2012 at 11:32 UTC
    Yes...The API call is returning before the data is ready. Is there anything that tells if the data is ready as you mentioned ?
      I have no idea. It will depend on the API, so you should read its docs.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics