bot/web: use json api, gzip middleware