add rest api polling support

Actually the HTML doesn't require tag closing.