Added actual polling code using requests lib