Handle http requests in web mode.