Backend for Polling (Issue #27)

Hi,
      I have fixed the backend for Issue #27. I have also changed over to REST API. Please review the code.

Thanks.