I need to poll on the response of the endpoint for a total time say 40 sec and have to check after the interval of 1 sec every time if I get the response. Is there any metho