replacing blocking curl call